This topic is locked
[SOLVED]

 Adding messages to the Lng files 5.3

1/4/2011 10:41:48 PM
PHPRunner General questions
D
Dale author

So i upgraded a 5.1 phprunner 5.1 to the 5.3 kind of a test, but was really hoping it would just be done poof!.

Lots of little problems, mainly adding and renaming of id's when building. ITs my own fault, I have lots, lots of custom javacript to manipulate the forms and lists. An alas, not much works that involves any javascript.
Anyway, the languages is what my issue is.
In earlier versions I would add custom messages to the language files I was using. Then I build, and get this the language.php file with all the goodies in it.

With the 5.3, I dont get the large language.php (which is really a good thing) I see there are 2 files built for each language selected.

Cool, but the added messages in the lng files are no where to be seen.
Where do I add messages to be translated.

D
Dale author 1/5/2011

Solved. You might want to have a look at this Sergey.
After some investigation, I found one of the danish.php file in the output lang folder to be well, kind of corrupted.

When I looked through the file when I got to the line $mlang_messages["Danish"]["FIELDS_PASSWORD3"] = "Ma ikke vaere BAD CORRUPTION "password" MORE BAD CORRUPTION";
I then checked the danish.lng file in the phprunner53/lang file and I found a difference in the file.

Line

<message tag="FIELDS_PASSWORD3">Ma ikke vaere "password"</message>
I changed the line to

<message tag="FIELDS_PASSWORD3">Ma ikke vaere 'password'</message>

Rebuilt and all worked fine.
I believe the use of the double quotes around the word password fouled the output. There were hundreds of /// slashes in the created danish.php file.

As I said, after the fix I just rebuilt and all languages were fine.
I can now use the same method as previously done.
I use English, French, Danish, Portuguese(Brazil) and Chinese (Tiawan) in this project. Funny how the error in the danish file stopped all other languages from updating properly.
The other thing I noticed though, in the Danish.php file generated it has the

$mlang_charsets["Danish"] = "Windows-1252";

I use a complete utf8_bin database including tables and fields.

The Danish.lng file has this line at the top.

<?xml version -"1.0" endcoding="utf-8" ?>
So when generated, should I not be expecting to see,

$mlang_charsets["Danish"]= "utf-8"; instead of $mlang_charsets["Danish"] = "Windows-1252"; that is there.??