B-Translator / old_btr_server

(Moved to: https://gitlab.com/b-translator/old_btr_server)
6 stars 3 forks source link

Drop all_langs.php, use CLDR #20

Closed nemobis closed 9 years ago

nemobis commented 10 years ago

https://github.com/B-Translator/btr_server/blob/master/modules/custom/btrCore/lib/fn/languages/all_langs.php is a very bad idea, use CLDR data instead. http://cldr.unicode.org/

CLDR is used by most i18n-heavy projects, including MediaWiki (particularly useful in https://www.mediawiki.org/wiki/Extension:Translate ).

dashohoxha commented 10 years ago

I agree that it is a bad idea, but I don't know any better way. The CLDR website is a big mess that I cannot understand (too technical for me). Couldn't they provide an API, for God's sake, where I can send a query and get the relevant answer?

I agree that it is a bad idea, but I don't know how to fix it. Can you provide a patch please? No, I am joking :) Thanks for opening this issue.

nemobis commented 10 years ago

Dashamir Hoxha, 17/11/2014 14:08:

Couldn't they provide an API, for God's sake, where I can send a query and get the relevant answer?

ICU does this part of the job. Most of it is accessible in PHP via Intl, try and give a look at http://php.net/manual/en/book.intl.php

dashohoxha commented 10 years ago

@nemobis It seems to me that it still does not do the trick. Given a language code (for example 'fr') can you show me how to get the language name (French) and whether it is LTR or RTL? This is what I need, but I cannot find such a function.

dashohoxha commented 9 years ago

all_langs.php dropped (but without using CLDR).