Lines Matching defs:locale
32 import os, sys, locale, random
137 # On Ubuntu, `locale -a` gives the wrong case for some locales,
142 elif find_executable('locale'):
143 locale_list = subprocess.Popen(["locale", "-a"],
149 # in their locale names.
158 if os.path.isfile("/etc/locale.alias"):
159 with open("/etc/locale.alias") as f:
189 loc = locale.setlocale(locale.LC_CTYPE)
193 return locale.getpreferredencoding()
316 # Generate random format strings with random locale setting
321 locale.setlocale(locale.LC_ALL, loc)
322 except locale.Error as err: