PHP how to get full names form month, day in language from browser

86 views Asked by At

I want to show the names of days and month in the language the browser provides. So I can set the language using setlocale, like : setlocale(LC_ALL, 'nl_NL') Then the names are all in dutch. And I can get the browser language with: $_SERVER["HTTP_ACCEPT_LANGUAGE"] So if my browser is Dutch $_SERVER["HTTP_ACCEPT_LANGUAGE"] returns 'nl' not 'nl_NL' But setlocale(LC_ALL, 'nl') does not work. I need a conversion method, so nl is converted to nl_NL. Not only dutch (that would be simple), but also the other languages. Or a completely other method :-)

regards Jan

0

There are 0 answers