You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to implement this todo from the README:
include other language/country code formats (3-letter codes...) ?
In the process, I would also like to propose some refactoring. What I have in mind here is:
Use 3-letter language and country codes in filenames and for lookup keys in data caches, because all languages have a 3-letter code, but not all have a 2-letter code.
Use codes in the case they are specified in the relevant ISO standard, i.e. lower-case for language codes, upper-case for country codes.
Change the storage format of the cached data to JSON, e.g. Languages in English:
Make the live data provider add to the cache two JSON dictionaries of alternate codes (2-letter/bibliographic/numeric) mapping them to their 3-letter equivalent, e.g. Language code dictionary:
When performing lookups by code, if the supplied code is unknown, i.e. has no matching cache file, lookup a 3-letter equivalent in the relevant dictionary and use that.
Before I get started working on a PR for the above, is there general support for some/any/all of this proposal?
The text was updated successfully, but these errors were encountered:
An alternative might be keeping 2-letter codes around and adding 3-letter files where necessary and then doing a 3-letter->2-letter lookup on missing, but that might get more complicated than jjust doing 3-letter lookup.
I would like to implement this todo from the README:
In the process, I would also like to propose some refactoring. What I have in mind here is:
Languages in English:
/cache/countries/eng.json
,/cache/countries/fra.json
, etc/cache/languages/eng.json
,/cache/languages/fra.json
, etcLanguage code dictionary:
Before I get started working on a PR for the above, is there general support for some/any/all of this proposal?
The text was updated successfully, but these errors were encountered: