getLocalizedString() and plugin
#1
Hello,

I'm translating the Launcher plugin to Swedish. I've added a folder under ..\XBMC\plugins\Programs\Launcher\resources\language called Swedish. In there I placed a copy of the strings.xml found in the corresponding English folder.

When I run the plugin, strings are still in English. Anyone have any idea why? My language is (of course) set to Swedish in XBMC and the strings DO change if I edit the English\strings.xml file, but I guess that's not the recommended way to go...

Help much appreciated!
Reply
#2
use right file encoding (utf-8) and test file structure
example opening in internet explorer
Reply
#3
Encoding is set to utf-8 in the document header. How do you mean "test folder structure"?

/English/strings.xml
/Swedish/strings.xml

That's how I have it. Anything else I can check?
Reply
#4
i mean is all < and > in right place
if you try open file example some internet browser. If structure is incorrect error occurs
Reply
#5
i just test launcher and translation, it works right.
I mean you need save file in utf-8 format, not only set in file header
Reply
#6
Enable XBMC debug with AdvanceSettings.xml

Run the script, then look for the debug lines in xbmc.log - If its failing to parse the Swedish string xml it will say something like 'failed to parse' and fall back to the english strings.

XML syntax errors and also bad characters can cause it to fail. (ie. & ) For those you'll need to use the allowed replacements .ie [CR] for newline. Not sure where there's a list of these replacement chars, I normally scour existing Strings.xml from other scripts for examples.
Retired from Add-on dev
Reply

Logout Mark Read Team Forum Stats Members Help
getLocalizedString() and plugin0