001/* 002 * Copyright 2024 Vonage 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package com.vonage.client.messages.whatsapp; 017 018import com.fasterxml.jackson.annotation.JsonValue; 019 020/** 021 * Enum representing BCP-47 locales supported by WhatsApp. 022 * The values are derived from the "Supported Languages" section of the 023 * <a href=https://developers.facebook.com/docs/whatsapp/api/messages/message-templates> 024 * WhatsApp Message Templates documentation</a>. 025 * 026 * @since 7.0.0 027 */ 028public enum Locale { 029 AFRIKAANS("af"), 030 ALBANIAN("sq"), 031 ARABIC("ar"), 032 AZERBAIJANI("az"), 033 BENGALI("bn"), 034 BULGARIAN("bg"), 035 CATALAN("ca"), 036 CHINESE_CHN("zh_CN"), 037 CHINESE_HKG("zh_HK"), 038 CHINESE_TAI("zh_TW"), 039 CROATIAN("hr"), 040 CZECH("cs"), 041 DANISH("da"), 042 DUTCH("nl"), 043 ENGLISH("en"), 044 ENGLISH_UK("en_GB"), 045 ENGLISH_US("en_US"), 046 ESTONIAN("et"), 047 FILIPINO("fil"), 048 FINNISH("fi"), 049 FRENCH("fr"), 050 GEORGIAN("ka"), 051 GERMAN("de"), 052 GREEK("el"), 053 GUJARATI("gu"), 054 HAUSA("ha"), 055 HEBREW("he"), 056 HINDI("hi"), 057 HUNGARIAN("hu"), 058 INDONESIAN("id"), 059 IRISH("ga"), 060 ITALIAN("it"), 061 JAPANESE("ja"), 062 KANNADA("kn"), 063 KAZAKH("kk"), 064 KINYARWANDA("rw_RW"), 065 KOREAN("ko"), 066 KYRGYZ_KYRGYZSTAN("ky_KG"), 067 LAO("lo"), 068 LATVIAN("lv"), 069 LITHUANIAN("lt"), 070 MACEDONIAN("mk"), 071 MALAY("ms"), 072 MALAYALAM("ml"), 073 MARATHI("mr"), 074 NORWEGIAN("nb"), 075 PERSIAN("fa"), 076 POLISH("pl"), 077 PORTUGUESE_BR("pt_BR"), 078 PORTUGUESE_POR("pt_PT"), 079 PUNJABI("pa"), 080 ROMANIAN("ro"), 081 RUSSIAN("ru"), 082 SERBIAN("sr"), 083 SLOVAK("sk"), 084 SLOVENIAN("sl"), 085 SPANISH("es"), 086 SPANISH_ARG("es_AR"), 087 SPANISH_SPA("es_ES"), 088 SPANISH_MEX("es_MX"), 089 SWAHILI("sw"), 090 SWEDISH("sv"), 091 TAMIL("ta"), 092 TELUGU("te"), 093 THAI("th"), 094 TURKISH("tr"), 095 UKRAINIAN("uk"), 096 URDU("ur"), 097 UZBEK("uz"), 098 VIETNAMESE("vi"), 099 ZULU("zu"); 100 101 private final String code; 102 103 Locale(String code) { 104 this.code = code; 105 } 106 107 @JsonValue 108 @Override 109 public String toString() { 110 return code; 111 } 112}