Bug 713649 - RFE - Ability to add missing language codes
Summary: RFE - Ability to add missing language codes
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Logic
Version: 1.3
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Sean Flanigan
QA Contact: Ding-Yi Chen
Depends On:
Blocks: 730186
TreeView+ depends on / blocked
Reported: 2011-06-16 06:21 UTC by Ruediger Landmann
Modified: 2012-11-06 02:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-02-10 05:16:58 UTC

Attachments (Terms of Use)
Script to add requested locales directly to database (1.62 KB, text/x-sql)
2011-06-17 00:35 UTC, Sean Flanigan
no flags Details

Description Ruediger Landmann 2011-06-16 06:21:05 UTC
This is really more of an administration bug than a deployment bug, but there's no category for that...

Description of problem:
Zanata is missing certain language codes that I need for my projects, specifically:


Some corresponding language-region combinations would be:


"la" probably should not have any region code

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Click Administration -> Manage languages -> Add new language
2. Try to find any of the above codes in the drop-down menu
Actual results:
Languages do not exist and cannot be added

Expected results:
Ability to add these languages

Additional info:

Comment 1 Sean Flanigan 2011-06-16 08:05:48 UTC
Reassigning to Component-Logic, which is probably questionable too...

The latest version of ICU4J (4.8) only seems to add one of the above languages as standard.  I think we can add custom locales by coding them, but we should allow the administrator to enter any locale code which conforms to the appropriate format.  I'm not sure how we'll handle not knowing the name of the locales in question.  

Where's a good reference to find the native name of a locale?

Comment 2 Ruediger Landmann 2011-06-16 23:28:27 UTC
(In reply to comment #1)

> The latest version of ICU4J (4.8) only seems to add one of the above languages
> as standard.

However, all of these languages have valid subtags in the IANA registry[1], which in turn is the list that IETF and W3C rely on. In each of these eight cases, the code corresponds to the code for this language in ISO 639-1 and ISO 639-2. The official list of ISO 639-2 codes is freely available, and includes many (most? all?) ISO 639-1 codes.[2]

> Where's a good reference to find the native name of a locale?

Unfortunately, the IANA registry only includes the English name, and ISO 639-2 only includes the English and French names.

Wikipedia is by far the most readily accessible source for the native names. In every instance I've seen, the very first line in any article about a language includes its native name. 

Code -- English name -- native name

ast -- Asturian -- Asturianu
bs -- Bosnian -- Bosanski
nds -- Low German -- Plattdüütsch
ky -- Kyrgyz -- Кыргыз тили
la -- Latin -- Latina
mn -- Mongolian -- Монгол хэл
tl -- Tagalog -- Tagalog
xh -- Xhosa -- isiXhosa

[1] http://www.iana.org/assignments/language-subtag-registry

[2] http://www.loc.gov/standards/iso639-2/php/English_list.php

Comment 3 Sean Flanigan 2011-06-17 00:34:18 UTC
Sorry, I didn't mean to imply that ICU4J was the definitive list of locales we should follow.  Our current implementation gets its list of locales there, so I thought I'd mention it.  We obviously do need the ability to add extra locales.

Thanks for looking up the names.

Comment 4 Sean Flanigan 2011-06-17 00:35:41 UTC
Created attachment 505167 [details]
Script to add requested locales directly to database

Comment 5 Sean Flanigan 2011-06-17 00:43:08 UTC
All the above locales have now been added to the fedora test instance.  (Disabled by default, admin must enable.)

Not closing the bug, because we still need UI to let admin do this.

Comment 6 Sean Flanigan 2011-06-17 00:49:04 UTC
Reducing severity due to workaround, but let me know if you disagree.

Comment 7 Sean Flanigan 2012-02-10 05:16:58 UTC
See bug 730186 for a UI to add locales by their codes.

Note You need to log in before you can comment on or make changes to this bug.