Kodi Community Forum
Russian Language for XBMC - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Translations and Languages (https://forum.kodi.tv/forumdisplay.php?fid=90)
--- Thread: Russian Language for XBMC (/showthread.php?tid=6209)

Pages: 1 2


- Martijn - 2012-02-11

viljoviitanen Wrote:Please elaborate. Why would it not work with skins? Are you familiar with the xbmc c++ codebase and how the current localization system works internally?

I have no idea how the XBMC code works Smile

for example this custom string in a skin:
PHP Code:
<string id="31025">Items</string

It should say "Item"or "Items". So you would need two string ID's.
PHP Code:
<string id="31025">Item</string>
<
string id="31026">Items</string

Now the hard part how is the skin gonna know with this custom string which one to use (in a very simple and easy way)?
There is the stringcompare that maybe could be used but that doesn't make it simpler.

If you use <label>Number of Items</label> that is passed to XBMC how does it know what custom skin string to return?
Just some thinking out loud here. Maybe the team has some ideas on doing this. In the end they will find a way Smile


- viljoviitanen - 2012-02-12

Martijn Wrote:I have no idea how the XBMC code works Smile

for example this custom string in a skin:
PHP Code:
<string id="31025">Items</string

It should say "Item"or "Items". So you would need two string ID's.
PHP Code:
<string id="31025">Item</string>
<
string id="31026">Items</string

Now the hard part how is the skin gonna know with this custom string which one to use (in a very simple and easy way)?

This is where the translation system and bigger changes comes in. The strings needs to be like "%d Items", and there will need to be a way to supply the parameter (%d here means "a decimal number"). Then translation system looks at the parameter, and in case of English, there are two "translations": "%d Item" if parameter=1 and "%d Items" if parameter=!1 (is anything else but one).

In case of other languages, like Russian, there are more complicated rules and more than 2 plular forms.

Sorry for hijacking the thread, this has little to do with the Russian translation any longer...


This forum uses Lukasz Tkacz MyBB addons.