Notice: CMSB v2.50 Beta 1

9 posts by 3 authors in: Forums > CMS Builder
Last Post: November 19, 2012   (RSS)

Re: [Dave] Notice: CMSB v2.50 Beta 1

By Djulia - November 14, 2012

Hi Dave,

I am lost a little with my file of translation. The file included in the update is less complete than the file of the previous versions.

Also, I added the missing entries but I am not certain that it is correct. Some entries are not translated.

Is it preferable to use the new file?

Thanks!

Djulia

Re: [Dave] Notice: CMSB v2.50 Beta 1

By Djulia - November 14, 2012

Hi Dave,

I understood the approach! ...and I must say that I am very impressed !!!

I am lost just a little with some entries which I cannot translate.

For example:

General Settings and Save and Cancel on the same page.

Do you have an idea?

Thanks again!

Djulia

Re: [Djulia] Notice: CMSB v2.50 Beta 1

By Dave - November 14, 2012

Hi Djulia,

Thanks for your feedback, I'm glad you like the new system. Let me know any ideas or impressions you have.

As you may have noticed, we've moved a number of the language entries into /lib/languages/adminMenus/. We also removed some that are no longer needed. All the required ones should be there but let me know if it looks like we lost any and I'll run a script to re-add them.

I know you write some plugins, have a look at /lib/languages/how_to_add_languages.txt. We've added a section for programmers on how to use translations in your plugins. Basically you just enable this Admin menu setting:
Developer Mode [x] Automatically add new language strings to language files.

And then any t("translated text") will be automatically added to a /languages/ folder under your plugin.

>I am lost just a little with some entries which I cannot translate. For example:
>General Settings and Save and Cancel on the same page.

Can you provide more details? Which page are these used on or which language entries or files are they?

If you haven't already done so, perhaps don't re-translate the file yet. Just experiment with it and make sure it's doing what you want until we get to the next beta.

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Notice: CMSB v2.50 Beta 1

By Djulia - November 14, 2012 - edited: November 14, 2012

Hi Dave,

It is on the General Settings page.

The texts do not seem to be added in the translation file created by Developer Mode [x].

Thanks!

Djulia

Re: [Dave] Notice: CMSB v2.50 Beta 1

By Djulia - November 14, 2012

Hi Dave,

In fact, there is no problem if the texts are translated directly in the adminMenu folder.

Only, they are not included in the file created by D Mode [X].

One can consider that the translation file in the adminMenu folder is the master file and that all our translations for the program must be made here (/adminMenu/file.php) ?

Thanks again!

Djulia

Re: [Dave] Notice: CMSB v2.50 Beta 1

By Djulia - November 16, 2012

Hi Dave,

How do we have to use the Developer Mode [x] if the chain to be translated comprises a variable or a function ?

Like this : t("Thanks, we've emailed you at " .htmlencode($to). ", to confirm...") ?

Thanks for your assistance.

Djulia

Re: [Djulia] Notice: CMSB v2.50 Beta 1

By Dave - November 16, 2012

Hi Djulia,

Good question, there's some example code for this in: /cmsAdmin/lib/languages/how_to_add_languages.txt

Basically, you just use sprintf - http://php.net/sprintf

<?php echo sprintf(t("Thanks, we've emailed you at %s to confirm..."), htmlencode($to)); ?>

Or broken into multiple lines for clarity:

<?php
$format = t("Thanks, we've emailed you at %s to confirm..."); // this gets translated
$value1 = htmlencode($to);
$output = sprintf($format, $value1);
echo $output;
?>


Hope that helps. Let me know if that makes sense.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Notice: CMSB v2.50 Beta 1

By Chris - November 19, 2012 - edited: November 19, 2012

Hi Djulia,

I'm wondering if this might be a permissions issue. Can you send me FTP information so I can test on your server?

Thanks,
Chris
All the best,
Chris