General localization crate

I just made the initial version of recoyx_localization, which parses locale and country codes (not any String is a valid language identifier), associates country to a locale (for example, English (United States)) and provides a LocaleMap (loads from HTTP or File System, can be cloned (robust for website routers) and reflect options given at LocaleMap instantiation).

Features it doesn't have, but maybe could be easy to add, are currency, collation and plurals (these could be implemented in Locale itself rather than in LocaleMap). It does support quantitative formatting anyway (composing msg as msg_empty, msg_one or msg_multiple based on a number formatting option).

1 Like