summaryrefslogtreecommitdiff
path: root/vendor/gems/common_languages/README.md
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-06-15 17:14:26 -0700
committerelijah <elijah@riseup.net>2015-06-15 17:14:26 -0700
commit83a9cadbb13bd2292c7d064d40721fa5f64119fb (patch)
tree294c13678a0514634a6817428d2c656738c14e52 /vendor/gems/common_languages/README.md
parent12ab515ecd448f98ff006e30a93e43626183b6d0 (diff)
added CommonLanguages gem
Diffstat (limited to 'vendor/gems/common_languages/README.md')
-rw-r--r--vendor/gems/common_languages/README.md36
1 files changed, 36 insertions, 0 deletions
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