You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
473 B

7 years ago
  1. # frozen_string_literal: true
  2. module SettingsHelper
  3. HUMAN_LOCALES = {
  4. en: 'English',
  5. de: 'Deutsch',
  6. es: 'Español',
  7. eo: 'Esperanto',
  8. pt: 'Português',
  9. fr: 'Français',
  10. hu: 'Magyar',
  11. uk: 'Українська',
  12. 'zh-CN': '简体中文',
  13. fi: 'Suomi',
  14. ru: 'Русский',
  15. ja: '日本語',
  16. }.freeze
  17. def human_locale(locale)
  18. HUMAN_LOCALES[locale]
  19. end
  20. def hash_to_object(hash)
  21. HashObject.new(hash)
  22. end
  23. end