Bubble Foundry

Posts tagged with: localization

Formatting Dutch Currency Amounts
How do you display one hundred fifty two dollars and thirteen cents with numbers? If you’re an American you might write it like $152.14, while a Dutch person might write $ 152,13. You’ll notice this if you change the international settings of your computer or phone from one country to another. But what are the rules […] Read more – ‘Formatting Dutch Currency Amounts’.
Setting Locales in Python
You can use locale to localize things like Python’s datetime module. However, its defaults aren’t always the nicest. For instance, for Dutch is defaults to ISO while I prefer UTF-8: >>> locale.setlocale(locale.LC_ALL, 'nl_NL') 'nl_NL' >>> locale.getlocale() ('nl_NL', 'ISO8859-1') >>> locale.setlocale(locale.LC_ALL, ('nl_NL', 'utf8@euro')) 'nl_NL.UTF-8' >>> locale.getlocale() ('nl_NL', 'UTF8') As you can see, for some reason ‘utf8@euro’ […] Read more – ‘Setting Locales in Python’.