Sha256: 50a90e31eb91d06914a68483a731bbf2544092a8455bd2a31af60a5ab37bd650
Contents?: true
Size: 507 Bytes
Versions: 141
Compression:
Stored size: 507 Bytes
Contents
# frozen_string_literal: true module Decidim # A Helper to render language names in their own language. module LanguageChooserHelper # Gets the name of the given locale, in that language. # # Example: # # locale_name(:es) => "Castellano" # # locale - a String representing the symbol of the locale. It will usually be 2 letters. # # Returns a String. def locale_name(locale) I18n.with_locale(locale) { I18n.t("name", scope: "locale") } end end end
Version data entries
141 entries across 141 versions & 2 rubygems