Unknown locale nb_NO ?

Ola Natvig ola.natvig at infosense.no
Tue Dec 7 09:22:00 EST 2004


Stas Z wrote:
> Hello,
> 
> Just noticed that the locale 'nb_NO' is not supported in Python?!
> 
> stas at mobi:~$ locale
> LANG=nb_NO
> [...]
> 
> stas at mobi:~$ python
> Python 2.3.4 (#2, Sep 24 2004, 08:39:09) 
> [GCC 3.3.4 (Debian 1:3.3.4-12)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> 
>>>>import locale
>>>>locale.getdefaultlocale()
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.3/locale.py", line 346, in getdefaultlocale
>     return _parse_localename(localename)
>   File "/usr/lib/python2.3/locale.py", line 280, in _parse_localename
>     raise ValueError, 'unknown locale: %s' % localename
> ValueError: unknown locale: nb_NO
> 
> 
> Any help would appreciated.
> 
> Thanks,
> Stas
> 
> 

I believe the standard locale for "Norsk bokmål" is 'no_NO'. You could 
try that.

Ola

-- 
--------------------------------------
  Ola Natvig <ola.natvig at infosense.no>
  infoSense AS / development



More information about the Python-list mailing list