0

I would like to use setlocale function to set locale for my function before use of strptime to get the time in a post request.

But I am using an old PHP version (5.1) which results in a runtime error reporting that this function is not defined. For example:

setlocale(LC_ALL, 'id_ID.UTF8', 'id_ID.UTF-8', 'id_ID.8859-1', 'id_ID', 'IND.UTF8', 
          'IND.UTF-8', 'IND.8859-1', 'IND', 'Indonesian.UTF8', 'Indonesian.UTF-8', 
          'Indonesian.8859-1', 'Indonesian', 'Indonesia', 'id', 'ID', 'en_US.UTF8', 
          'en_US.UTF-8', 'en_US.8859-1', 'en_US', 'American', 'ENG', 'English');

I would like to know where those locale strings are defined? I don't know where people take them from to fill in such a function.

hakre
  • 193,403
  • 52
  • 435
  • 836
Kingston Town
  • 63
  • 1
  • 9
  • possible duplicate of [Get default locale for language in PHP](http://stackoverflow.com/questions/8568762/get-default-locale-for-language-in-php) – hakre Jun 23 '12 at 11:32

1 Answers1

0

On the computer where you execute your PHP scripts, execute the following system command:

locale -a

It will return the installed locales.

See as well the locale(1) - Linux man page and a related (if not duplicate) question:

Community
  • 1
  • 1
hakre
  • 193,403
  • 52
  • 435
  • 836