From 83a9cadbb13bd2292c7d064d40721fa5f64119fb Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 15 Jun 2015 17:14:26 -0700 Subject: added CommonLanguages gem --- vendor/gems/common_languages/README.md | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 vendor/gems/common_languages/README.md (limited to 'vendor/gems/common_languages/README.md') diff --git a/vendor/gems/common_languages/README.md b/vendor/gems/common_languages/README.md new file mode 100644 index 0000000..264fe0a --- /dev/null +++ b/vendor/gems/common_languages/README.md @@ -0,0 +1,36 @@ +# CommonLanguages + +A simple gem that provides the ability to display the list of +I18n.available_locales in a localized and friendly way. + +There are many similar or related gems. For example: + +* https://github.com/davec/localized_language_select +* https://github.com/teonimesic/language_switcher +* https://github.com/grosser/i18n_data +* https://github.com/scsmith/language_list + +I wanted something different than what these others provide: + +* Language names should be displayed in the native name for each language, not + a localized or anglicized version. +* There should not be any gem dependencies. +* Since there is no universal collation across all languages, they should be + sorted in order of popularity. +* There should not be any need to parse large data files, 99% of which will + never be used. + +# Usage + +This code: + + I18n.available_locales = [:de, :en, :pt] + CommonLanguages.available.each do |language| + p [language.code, language.name, language.english_name, language.rtl?] + end + +Produces: + + [:en, "English", "English", false] + [:pt, "Português", "Portugues", false] + [:de, "Deutsch", "German", false] \ No newline at end of file -- cgit v1.2.3