Kodi Community Forum

Full Version: Strings not found by WindowXMLDialog
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm relativly new to XBMC, so sorry if this is a stupid question. I have a custom WindowXMLDialog with the following markup:

<window id="5000" type="dialog">
        <control type="label" id="5002">
            <label>$LOCALIZE[30001] :</label>

And my English strings.xml file looks as follows:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <string id="30000">Local Path</string>
    <string id="30001">Caching files</string>

The problem is that the string is never retirieved. In my GUI only the : is shown on the label. I also tried:


without success. I checked and my XBMC language is set to English, my strings.xml is in the correct directory (resources/language/English/strings.xml). I'm running XBMC 11.0 on Ubuntu 12.04.

I've managed to use the default XBMC strings, eg:


and it works, but my own IDs don't. Does anyone have an idea why?
use $ADDON[30001] and smile.
If I do that, my dialog doesn't even show. And there is nothing in the debug log file that points to an error.
Nope ronie, that also returns an empty string.
Are you sure you don't have a strings.po file in the same directory ? In that case xbmc uses the po file not the xml file, therefore your string in the xml file will never show up.
(2012-09-24, 15:51)goocreations Wrote: [ -> ]Nope ronie, that also returns an empty string.

it should work, though it could be you can't use certain string id's that way.
give it a shot with $LOCALIZE[SCRIPT650]
Somehow I didn't get email notifications on your reply, so sorry for my late response.

No, I don't have any .po files
Yes, $LOCALIZE[SCRIPT650] works. So seems like you can't use any IDs. The development doc stated that one should use IDs 30000 and onwards. So is this not true? Any range I should use without breaking XBMCs strings?
Adding to this, in your settings file, you have something like this:

<setting id="batchmode" type="enum" label="30005" values="Value1|Value2" />

Now then label is replace by the language string. Is there any way the value itself (eg: Value1 and Value2) can be replaced by language strings?
On my script cdART Manager I use the following in my XML file
<label>$ADDON[script.cdartmanager 32000]</label>

Never had an issue.

And yes you can use string ids for the values