Sha256: 756ddde9ba5609291ceb372b22dc0213c8bdf525b77333613aaf7e4d6512fd68

Contents?: true

Size: 204 Bytes

Versions: 19

Compression:

Stored size: 204 Bytes

Contents

module ZendeskAppsTools
  class LocaleIdentifier
    attr_reader :language_id

    # Convert :"en-US-x-12" to 'en-US'
    def initialize(code)
      @language_id = code.sub(/-x-.*/, '')
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
zendesk_apps_tools-1.18.1 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.18.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.17.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.15.1 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.15.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.14.2 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.14.1 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.14.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.13.2 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.13.1 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.13.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.12.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.11.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.10.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.9.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.8.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.7.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.6.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.5.0 lib/zendesk_apps_tools/locale_identifier.rb