Welcome, guest | Sign In | My Account | Store | Cart

list all locales via Python

Python, 8 lines
1
2
3
4
5
6
7
8
#!/usr/local/bin/python2.7
# encoding: utf-8

import locale

alllocale = locale.locale_alias
for k in alllocale.keys():
    print 'locale[%s] %s' % (k, alllocale[k])    
Created by Shane Wang on Sat, 19 Apr 2014 (MIT)
Python recipes (4591)
Shane Wang's recipes (2)

Required Modules

  • (none specified)

Other Information and Tasks