help us translate addons

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ronie Offline
Team-Kodi Member
Posts: 9,333
Joined: Jan 2009
Reputation: 162
Post: #46
is it possible for an addon to have different translations for Chinese (Simple) and Chinese (Traditional)?

if so, what language code can i use?
as far as i know, they both use lang="zh".

same question for all other 'duplicate' languages, like Portuguese (Brazil), Spanish (Mexico), etc...

Always read the Kodi online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #47
no, it's not currently.
find quote
ronie Offline
Team-Kodi Member
Posts: 9,333
Joined: Jan 2009
Reputation: 162
Post: #48
spiff Wrote:no, it's not currently.

cheers, all i needed to know.

Always read the Kodi online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
parad Offline
Junior Member
Posts: 6
Joined: Feb 2011
Reputation: 0
Post: #49
I modified Spanish (Mexico) to Spanish (Argentina), and translate to lang=sp all my scrapers.

But the info in xbmc is in english, how can i get the info translated?

Thanks
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #50
we will use the same lang code as the one you have for your xbmc language, if it doesn't exist we fall back to english.
find quote
parad Offline
Junior Member
Posts: 6
Joined: Feb 2011
Reputation: 0
Post: #51
spiff Wrote:we will use the same lang code as the one you have for your xbmc language, if it doesn't exist we fall back to english.

Mmm...

I've 3 spanish languages: Spanish, Spanish (Mexico), Spanish(Argentina) (I only need the one for Argentina but keep the others for help me with translation and because i don't want to delete anything from the original installation).

The three languages have the "sp" lang code. And my translation for the scraper has a lang="sp" description, but when i open xbmc and look for the scraper info, it appears in english.

What i've to do to see the info in spanish?

Thanks
find quote
parad Offline
Junior Member
Posts: 6
Joined: Feb 2011
Reputation: 0
Post: #52
parad Wrote:Mmm...

I've 3 spanish languages: Spanish, Spanish (Mexico), Spanish(Argentina) (I only need the one for Argentina but keep the others for help me with translation and because i don't want to delete anything from the original installation).

The three languages have the "sp" lang code. And my translation for the scraper has a lang="sp" description, but when i open xbmc and look for the scraper info, it appears in english.

What i've to do to see the info in spanish?

Thanks

Anyone can help me with this?
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #53
vanilla Spanish has lang code es. unfortunately so does mexico and likely argentina. we need to expand it to use 3 letter langcodes to distinguish.
find quote
parad Offline
Junior Member
Posts: 6
Joined: Feb 2011
Reputation: 0
Post: #54
Thanks for your answer.

Then i suppose that the better solution by now is keep only the spanish translation (with "Spanish" as name and "es" as lang)

I will try this and see if the info is in spanish.
find quote
MaDDoGo Offline
Senior Member
Posts: 248
Joined: Sep 2009
Reputation: 1
Location: Sabadell (Barcelona)
Post: #55
Why don't you support extended language tags (es_ES, es_AR, etc...)?

Isn't possible to make a field in the language strings to name the sublanguages?
Maybe in langinfo.xml make a field like <id> to force a language tag. Maybe then add the Language String (Español (España)) and rename the language folder to es_ES.

Will That change slowdown the program so much?

That is only a suggestion, and if I'll know C++ I'll try to do it Sad

Cheers!

[Image: widget]
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #56
actually it's just a todo, we have the info now (didnt when i added the localization). see the locale stuff in LangInfo.cpp / langinfo.xml
find quote
MaDDoGo Offline
Senior Member
Posts: 248
Joined: Sep 2009
Reputation: 1
Location: Sabadell (Barcelona)
Post: #57
I looked at this and I think this would read the information from langinfo.xml:

Quote: const TiXmlNode *pLocale = pRootElement->FirstChild("locale");
if (pLocale && !pLocale->NoChildren())
{
const TiXmlNode *pLangLocaleName = pLocale->FirstChild("LangLocaleName");
if (pLangLocaleName && !pLangLocaleName->NoChildren())
m_defaultRegion.m_strLangLocaleName=pLangLocaleName->FirstChild()->Value();

const TiXmlNode *pRegionLocaleName = pLocale->FirstChild("audio");
if (pRegionLocaleName && !pRegionLocaleName->NoChildren())
m_defaultRegion.m_strRegionLocaleName=pRegionLocaleName->FirstChild()->Value();
}

And would read this:

Quote: <locale>
<LangLocaleName>Español (España)</LangLocaleName>
<RegionLocaleName>es_ES</RegionLocaleName>
</locale>

Sorry if it's not the place but I don't know how to do it better.

Then in the options, maybe you can adapt the addon's way of reading tags (but instead of Addons name you read locale's name) using the es_ES file scheme.

[Image: widget]
(This post was last modified: 2011-02-17 00:09 by MaDDoGo.)
find quote
Post Reply