[answered] Language files must end with '.xml' ?

Human Bug

14-03-2012 22:26:50

Hi,

i use MyGUI 3.2.

Is it right that the language files must end with '.xml' ?
Else the tags in the layout will not replaced.


// load Language
MyGUI::LanguageManager::getInstancePtr()->loadUserTags("core.language.xml");
MyGUI::LanguageManager::getInstancePtr()->loadUserTags("core.language.german.xml");
MyGUI::LanguageManager::getInstancePtr()->loadUserTags("core.language.english.xml");



<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Language">
<Language default="German">
<Info name="German">
<Source>core.language.german.xml</Source>
</Info>
<Info name="English">
<Source>core.language.english.xml</Source>
</Info>
</Language>
</MyGUI>

Altren

15-03-2012 08:16:10

They should match real file name, and it doesn't matter if it's end is '.xml' or not. You just need to use file name without omitting it's extension.

Altren

15-03-2012 08:20:24

Hm, looks like I was wrong. There are two supported formats for language files - xml and raw text with two values on each line. And when you use non-xml extension second format is used.
That's not really clear behaviour, so I think we might change this to detecting format.