Closed nemobis closed 9 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.
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
@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.
all_langs.php dropped (but without using CLDR).
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 ).