Home » Internationalization » I18Nv2 » Bug #4280
First letter in languages and countries are always in uppercase.
Details
| Submitted | 2005-05-04 15:23 UTC |
|---|---|
| From | Peter dot Albertsson at spray dot se |
| Status | Wont fix |
| Package | I18Nv2 |
| PHP Version | 5.0.4 |
| OS | SuSE Linux 9.1 Home |
| Roadmaps | (Not assigned) |
Comments
[2005-05-04 15:23 UTC] Peter dot Albertsson at spray dot se
Description:
------------
Country names and language names are always returned with first letter in uppercase. This is alright with English country and language names, but it is not for Swedish, since country and language names are not written with first letter in uppercase in Swedish.
The application programmer shouldn't have to know whether or not to lowercase the first letter in language and country names depending on the locale. Imagine the amount of work that would require!
I think it would be much better if I18Nv2 returned country and language names with the correct case from the beginning.
I've read bug report "Bug #2816: Inconsistent capitalization of language names", and I must say that I disagree. My motivation as above is that the application programmer should not be expected to know whether or not the first letter should be in uppercase, and imagine the work and knowledge required for him/her to correct incorrect capitalization!
Thank you for a great package. Drop me a mail if you want any assistance with the Swedish locale for this package.
Reproduce code:
---------------
$sv_language = new I18Nv2_Language('sv', 'UTF-8');
echo $sv_language->getName('sv');
$en_language = new I18Nv2_Language('en', 'UTF-8');
echo $en_language->getName('sv');
Expected result:
----------------
svenska
Swedish
Actual result:
--------------
Svenska
Swedish
[2005-05-04 15:49 UTC] Peter dot Albertsson at spray dot se
Correction for my previous description. As for the Swedish locale, Swedish country names are capitalized but Swedish language names are not.