Name

getdefaultlocale

Synopsis

getdefaultlocale(envvars=['LANGUAGE','LC_ALL',
                 ‘LC_TYPE','LANG'])

Examines the environment variables whose names are specified by argument envvars, in order. The first variable found in the environment determines the default locale. getdefaultlocale returns a pair of strings ( lang,encoding ) compliant with RFC 1766 (except for the 'C' locale), such as ('en_US','ISO8859-1'). Each item of the pair may be None if gedefaultlocale is unable to discover what value the item should have.

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.