Locale codes for iPhone lproj folders

You can just call them English.lproj, Spanish.lproj, etc. The “abbreviated names” are actually IETF language tags (i.e. BCP 47), except that you use pt_PT.lproj instead of pt-PT.lproj. The actual interpretation routine is in https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/PlugIn.subproj/CFBundle_Locale.c, determined by the CFBundleGetLocalizationInfoForLocalization function. Replicated here: | lproj identifiers | L# | C# | Display name | |:——————————-|:—-|:—-|:—————————| | en_US … Read more

Using ResourceManager

There’s surprisingly simple way of reading resource by string: ResourceNamespace.ResxFileName.ResourceManager.GetString(“ResourceKey”) It’s clean and elegant solution for reading resources by keys where “dot notation” cannot be used (for instance when resource key is persisted in the database).

Which Locale should I specify when I call String#toLowerCase?

Yes, Locale.ENGLISH is a safe choice for case operations for things like programming language identifiers and URL parts since it doesn’t involve any special casing rules and all 7-bit ASCII characters in the ENGLISH case-convert to 7-bit ASCII characters. That is not true for all other locales. In Turkish, the ‘I’ and ‘i’ characters are … Read more

Selecting message language in gcc and g++

The end of the GCC manpage contains an overview of its locale environment variables: LANG LC_CTYPE LC_MESSAGES LC_ALL These environment variables control the way that GCC uses localization information that allow GCC to work with different national conventions. GCC inspects the locale categories LC_CTYPE and LC_MESSAGES if it has been configured to do so. These … Read more