Hello
I have strings in different languages, all of them start with a capital letter (for those languages that support it).
Is there a locale-aware method to change those strings so that the first letter will be in lowercase?
The solution must be locale specific.
For example:
The string 'Écran' (Screen in English) will need to be converted to 'écran'.
thanks in advance
how to lowercase in the correct locale
Moderator: General Moderators
-
davidklonski
- Forum Contributor
- Posts: 128
- Joined: Mon Mar 22, 2004 4:55 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
try:
Code: Select all
html_entity_decode(strtolower(htmlentites($str,ENT_QUOTES)),ENT_QUOTES);-
davidklonski
- Forum Contributor
- Posts: 128
- Joined: Mon Mar 22, 2004 4:55 pm
I have found the following:
I needed to make sure the php_mbstring.dll was included in php.ini
Code: Select all
mb_strtolower($string, $encoding);