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.

24 lines
425 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. pt: 'Português',
  8. fr: 'Français',
  9. hu: 'Magyar',
  10. uk: 'Українська',
  11. 'zh-CN': '简体中文',
  12. fi: 'Suomi',
  13. eo: 'Esperanto',
  14. }.freeze
  15. def human_locale(locale)
  16. HUMAN_LOCALES[locale]
  17. end
  18. def hash_to_object(hash)
  19. HashObject.new(hash)
  20. end
  21. end