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.

28 lines
530 B

  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. fr: 'Français',
  9. hu: 'Magyar',
  10. no: 'Norsk',
  11. pt: 'Português',
  12. fi: 'Suomi',
  13. ru: 'Русский',
  14. uk: 'Українська',
  15. ja: '日本語',
  16. 'zh-CN': '简体中文',
  17. 'zh-HK': '繁體中文(香港)',
  18. }.freeze
  19. def human_locale(locale)
  20. HUMAN_LOCALES[locale]
  21. end
  22. def hash_to_object(hash)
  23. HashObject.new(hash)
  24. end
  25. end