001package org.gwtbootstrap3.extras.datetimepicker.client.ui.base.constants; 002 003/* 004 * #%L 005 * GwtBootstrap3 006 * %% 007 * Copyright (C) 2013 - 2016 GwtBootstrap3 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023import com.google.gwt.resources.client.TextResource; 024import org.gwtbootstrap3.extras.datetimepicker.client.DateTimePickerClientBundle; 025 026/** 027 * @author Joshua Godi 028 */ 029public enum DateTimePickerLanguage { 030 AR("ar", DateTimePickerClientBundle.INSTANCE.ar()), 031 AZ("az", DateTimePickerClientBundle.INSTANCE.az()), 032 BG("bg", DateTimePickerClientBundle.INSTANCE.bg()), 033 BN("bn", DateTimePickerClientBundle.INSTANCE.bn()), 034 CA("ca", DateTimePickerClientBundle.INSTANCE.ca()), 035 CS("cs", DateTimePickerClientBundle.INSTANCE.cs()), 036 DA("da", DateTimePickerClientBundle.INSTANCE.da()), 037 DE("de", DateTimePickerClientBundle.INSTANCE.de()), 038 EE("ee", DateTimePickerClientBundle.INSTANCE.ee()), 039 EL("el", DateTimePickerClientBundle.INSTANCE.el()), 040 ES("es", DateTimePickerClientBundle.INSTANCE.es()), 041 FI("fi", DateTimePickerClientBundle.INSTANCE.fi()), 042 FR("fr", DateTimePickerClientBundle.INSTANCE.fr()), 043 HE("he", DateTimePickerClientBundle.INSTANCE.he()), 044 HR("hr", DateTimePickerClientBundle.INSTANCE.hr()), 045 HU("hu", DateTimePickerClientBundle.INSTANCE.hu()), 046 ID("id", DateTimePickerClientBundle.INSTANCE.id()), 047 IS("is", DateTimePickerClientBundle.INSTANCE.is()), 048 IT("it", DateTimePickerClientBundle.INSTANCE.it()), 049 JA("ja", DateTimePickerClientBundle.INSTANCE.ja()), 050 KA("ka", DateTimePickerClientBundle.INSTANCE.ka()), 051 KO("ko", DateTimePickerClientBundle.INSTANCE.ko()), 052 LT("lt", DateTimePickerClientBundle.INSTANCE.lt()), 053 LV("lv", DateTimePickerClientBundle.INSTANCE.lv()), 054 MS("ms", DateTimePickerClientBundle.INSTANCE.ms()), 055 NB("nb", DateTimePickerClientBundle.INSTANCE.nb()), 056 NL("nl", DateTimePickerClientBundle.INSTANCE.nl()), 057 NO("no", DateTimePickerClientBundle.INSTANCE.no()), 058 PL("pl", DateTimePickerClientBundle.INSTANCE.pl()), 059 PT_BR("pt-BR", DateTimePickerClientBundle.INSTANCE.pt_BR()), 060 PT("pt", DateTimePickerClientBundle.INSTANCE.pt()), 061 RO("ro", DateTimePickerClientBundle.INSTANCE.ro()), 062 RS_LATIN("rs-latin", DateTimePickerClientBundle.INSTANCE.rs_latin()), 063 RS("rs", DateTimePickerClientBundle.INSTANCE.rs()), 064 RU("ru", DateTimePickerClientBundle.INSTANCE.ru()), 065 SK("sk", DateTimePickerClientBundle.INSTANCE.sk()), 066 SL("sl", DateTimePickerClientBundle.INSTANCE.sl()), 067 SV("sv", DateTimePickerClientBundle.INSTANCE.sv()), 068 SW("sw", DateTimePickerClientBundle.INSTANCE.sw()), 069 TH("th", DateTimePickerClientBundle.INSTANCE.th()), 070 TR("tr", DateTimePickerClientBundle.INSTANCE.tr()), 071 UA("ua", DateTimePickerClientBundle.INSTANCE.ua()), 072 UK("uk", DateTimePickerClientBundle.INSTANCE.uk()), 073 ZH_CN("zh-CN", DateTimePickerClientBundle.INSTANCE.zh_CN()), 074 ZH_TW("zh-TW", DateTimePickerClientBundle.INSTANCE.zh_TW()), 075 EN("en", null); // Base language, don't need another file 076 077 private final String code; 078 private final TextResource js; 079 080 private DateTimePickerLanguage(final String code, final TextResource js) { 081 this.js = js; 082 this.code = code; 083 } 084 085 public String getCode() { 086 return code; 087 } 088 089 public TextResource getJs() { 090 return js; 091 } 092}