Countriex - library for: countries, currencies, dictionaries, keyboard layouts and languages

I plan to support:

  1. List countries (historical and current) - maybe also some historical data like unions
  2. List languages used in specified country (official, local, historical, etc.)
  3. List currencies used in specified country (current and historical)
  4. List coding systems for specified country / language
  5. List keyboard layouts for specified country / language
  6. Try to fetch language data from wiktionary
  7. Try to fetch currency cost (don’t know if there is any service to calculate historical values, but it’s not most important)

and therefore provide:

  1. Ability to suggest a keyboard layout, language and country based on input (at least by language code like en_US and user agent - maybe more)
  2. Ability to convert from one currency into another and calculate specified percent of transfer cost.
  3. Ability to suggest correct by: any character (correct own names), any letter, similar letter (for problems with OCR) and keyboard typos (i.e. nearest keys for specified keyboard layout) for n number of max letters to correct (biggest n => more hints).
  4. Ability to suggest a word based on rule (starts with, contains and ends with) with optional correct (like in 3rd point).
  5. Ability to list antonyms, example sentences, synonyms, translations (and more) for specified word.
  6. Convert coding systems (for example converts between: cp1250, iso8859-2 and utf-8 for Polish language text)
  7. External links to wiktionary source
  8. Other features related to countries, currencies, keyboard layouts and languages
  9. Maybe detect language based on input text
  10. Your suggestions - always welcome!

Of course I will look at similar libraries trying to find all that could be used in my library without any limitations.

Example language struct:

%Countriex.Language{
  base_code: :en, # English language
  country_code: :us, # USA variant
  # + additional function that joins them to format like: `:en_US`
  country_origin: :usa, # firstly used in
  extra_code: :ny, # New York local variant code
  # here local language variant should extend global (country) language variant
  # I mean slang that could be used interchangeably with standard variant
}

I have lots of ideas for libraries and only two hands, so I can’t say when exactly I plan this one. :slight_smile:

7 Likes

This is a really great idea, I hope get implemented :smiley:

1 Like

@WolfDan: No need to worry. In future I will definitely need to use all libraries and their features that I have in plans, so it’s only matter of moneys and time. This one is my idea when I saw google translate hints. It was really useful. It should not be a problem to hint language based on dictionary and then I could also hint multiple words by simple rule: sort languages in hint by number of words that fully matches in dictionary.
btw. As well as I remember there was about 50+ libraries in my mind at start and from day to day I have new ideas. It’s going to be lots of work to implement all. :slight_smile:

1 Like