Hi,
I want to localize MB and Subdued theme to Hebrew.
I have read the localization KB, Where it said:
NOTE: If your translations in the xml file mysteriously disappear, then check the encoding of that file. The correct encoding should be ‘UTF-8 without BOM’. Convert to ‘UTF-8 without BOM’ BEFORE any translations, eg. with Notepad++
I did the above but the localization file : Subdued-strings-he.xml and strings-he.xml keep on resetting back to English.
Is there a problem with the Hebrew language?
Thanks, Tempo
I think you have to make sure you add the approriate version to te strings file. If the version tag is set to something below the one in the code it will reset the strings file
In the MyStrings.cs that is generated when creating a new theme, there is the following:
const string VERSION = "1.0001"; //this is used to see if we have changed and need to re-save
...
public static MyStrings FromFile (string file)
{
MyStrings s = new MyStrings ();
XmlSettings<MyStrings> settings = XmlSettings<MyStrings>.Bind (s, file);
Logger.ReportInfo ("Using String Data from " + file);
if (VERSION != s.Version)
{
File.Delete (file);
s = new MyStrings ();
settings = XmlSettings<MyStrings>.Bind (s, file);
}
return s;
}
So, if the version tag in the string file is not equal (not even a numeric comparison) to the constant compiled in with the theme, the file is deleted and reset with the base strings. Not sure if MB core does this as well; but, you're right, it’s not very straightforward and leaves the door open to string files being “accidentally” reset if a theme changes its string version.
Hi,
Thank you guys for that info i will check it.
does the Subdued-strings-he.xml and strings-he.xml need to have the same version or the subdued xml has one version an MB has another?
p.s
when translating MB will use Subdued-strings-he.xml and strings-he.xml together in order to localize all of the strings, not just the subdued one, right?
Thanks, Tempo
Hi,
I managed to make it work by using the version tag as you suggested.
I will have MB and Subdued Hebrew translation hopefully by the end of next week :D
so far it looks good :)