Module: Whatsapp::Utils::LanguageCodes
- Defined in:
- lib/ruby/whatsapp/utils/language_codes.rb
Overview
Utility module for WhatsApp supported language codes Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/supported-languages
Constant Summary collapse
- CODES =
%w[ af sq ar az bn bg ca zh_CN zh_HK zh_TW hr cs da nl en en_GB en_US et fil fi fr ka de el gu ha he hi hu id ga it ja kn kk rw_RW ko ky_KG lo lv lt mk ms ml mr nb fa pl pt_BR pt_PT pa ro ru sr sk sl es es_AR es_ES es_MX sw sv ta te th tr uk ur uz vi zu ].freeze
Class Method Summary collapse
-
.all ⇒ Array<String>
Get all supported language codes.
-
.valid?(code) ⇒ Boolean
Check if a language code is valid.
Class Method Details
.all ⇒ Array<String>
Get all supported language codes
91 92 93 |
# File 'lib/ruby/whatsapp/utils/language_codes.rb', line 91 def self.all CODES end |
.valid?(code) ⇒ Boolean
Check if a language code is valid
85 86 87 |
# File 'lib/ruby/whatsapp/utils/language_codes.rb', line 85 def self.valid?(code) CODES.include?(code.to_s) end |