Kodi Community Forum

Full Version: Questions about $LOCALIZE and strings.xml
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Guys,

I'm trying to tweak an existing skin and whilst looking through the Kodi wiki pages on skinning I've noticed mention of "$LOCALIZE" in a number of wiki pages e.g. on the label parsing page and the label formatting page. However, it's not clear to me what exactly $LOCALIZE[something] does/returns and what is represented by what goes in the brackets.

Also, there's mention of strings.xml. Where is this mysterious file located? I can't seem to find it anywhere :|

Would really appreciate it if someone could kindly explain what they do and how to use them or point me to a source which can help.

Thanks Wink
strings.xml was the old xml-based format for translations, you now have to edit the strings.po file (located in language/xxx/ ).
$LOCALIZE[] basically explicitely tells kodi to translate that label id to the corresponding label. (have a look at the strings.po files and you will understand Smile )
be aware that there are also other labels available than the ones provided by the skin. Kodi for example has its own ones in Kodi-folder/language/)
(2015-02-09, 21:48)phil65 Wrote: [ -> ]strings.xml was the old xml-based format for translations, you now have to edit the strings.po file (located in language/xxx/ ).
$LOCALIZE[] basically explicitely tells kodi to translate that label id to the corresponding label. (have a look at the strings.po files and you will understand Smile )
be aware that there are also other labels available than the ones provided by the skin. Kodi for example has its own ones in Kodi-folder/language/)

Thanks Phil, it all makes sense now. The odd mentions of 'strings.xml' and $LOCALIZE without actually linking or mentioning languages in the wiki had me wondering what it was about. Tongue
Sorry to be really stupid, but I can't find where the Kodi system labels are stored. I've searched the Kodi directory in my programs directory and my roaming appdata folder for a strings.po file but the only ones I find are in the specific addons. The following is a segment of Ronie's code for Album Information in Transparency. I can't work out where the localize[563] comes from. The addon's own strings.po file starts at 31000.

Code:
                            <item>
                                <label>[UPPERCASE][B]$LOCALIZE[563]:[/B][/UPPERCASE]</label>
                                <label2>$INFO[ListItem.Property(Album_Rating)]</label2>
                                <onclick>noop</onclick>
                            </item>

Also, while here I really prefer star ratings to numbers, but if I change the label to $INFO[ListItem.Property(Album_StarRating)] it doesn't work. Is there a list item property for star rating?
Take a look at the KODI main string.po located in /Program files/KODI/addons/resource.language.en_gb/resources/
Brilliant - thanks guys - that saved me a few days of hunting.

So, 33067 is star rating. Just need to work out how to get the list item property.

BTW - the wiki still refers to strings.xml. http://kodi.wiki/view/Label_Parsing
(2015-09-10, 12:28)WelshPaul Wrote: [ -> ]BTW - the wiki still refers to strings.xml. http://kodi.wiki/view/Label_Parsing

http://kodi.wiki/view/Language_support

This is the old strings management. Replaced by strings.po