|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78528 Norwegian 'no' missing in \ResourceBundle::getLocales('') array
Submitted: 2019-09-12 11:19 UTC Modified: 2021-02-12 14:47 UTC
From: m dot voelker at crew-united dot com Assigned: cmb (profile)
Status: Not a bug Package: intl (PECL)
PHP Version: 7.3.9 OS: Windows + Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
48 - 22 = ?
Subscribe to this entry?

 [2019-09-12 11:19 UTC] m dot voelker at crew-united dot com
The method call \ResourceBundle::getLocales('') from the intl extensions returns a huge array with language codes.

The list contains (German names here):

'nb'    => 'Norwegisch Bokmål'
'nb_NO' => 'Norwegisch Bokmål (Norwegen)'
'nb_SJ' => 'Norwegisch Bokmål (Spitzbergen und Jan Mayen)'
'nn'    => 'Norwegisch Nynorsk'
'nn_NO' => 'Norwegisch Nynorsk (Norwegen)'

but *NOT* the main key 'no' => 'Norwegisch'

Using 'no' however works and translates (to 'Norwegisch') without a problem.

Problem occurs on Windows and Linux with all current php versions (7.1, 7.2, 7.3, 7.4RC1).

Test script:
a) With intl extension NOT enabled
Windows shell / cmd:
php -dextension=php_intl.dll -r "var_dump(\ResourceBundle::getLocales(''));" | find "no"

php -r "var_dump(\ResourceBundle::getLocales(''));" | grep no

b) With intl extension enabled
Windows shell / cmd:
php -r "var_dump(\ResourceBundle::getLocales(''));" | find "no"

php -r "var_dump(\ResourceBundle::getLocales(''));" | grep no

Expected result:
'no' should be a key in the array returned by:

Test scripts (above) should output the 'no' key.

Actual result:
Key does not exist in array returned by:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-12 14:47 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2021-02-12 14:47 UTC]
This would be a bug in ICU.  Consider to report to upstream[1].

[1] <>
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Apr 13 20:01:23 2021 UTC