001    package org.gwtbootstrap3.extras.datetimepicker.client.ui.base.constants;
002    
003    /*
004     * #%L
005     * GwtBootstrap3
006     * %%
007     * Copyright (C) 2013 - 2014 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    
023    import com.google.gwt.resources.client.TextResource;
024    import org.gwtbootstrap3.extras.datetimepicker.client.DateTimePickerClientBundle;
025    
026    /**
027     * @author Joshua Godi
028     */
029    public enum DateTimePickerLanguage {
030        AR("ar", DateTimePickerClientBundle.INSTANCE.ar()),
031        BG("bg", DateTimePickerClientBundle.INSTANCE.bg()),
032        CA("ca", DateTimePickerClientBundle.INSTANCE.ca()),
033        CS("cs", DateTimePickerClientBundle.INSTANCE.cs()),
034        DA("da", DateTimePickerClientBundle.INSTANCE.da()),
035        DE("de", DateTimePickerClientBundle.INSTANCE.de()),
036        EE("ee", DateTimePickerClientBundle.INSTANCE.ee()),
037        EL("el", DateTimePickerClientBundle.INSTANCE.el()),
038        ES("es", DateTimePickerClientBundle.INSTANCE.es()),
039        FI("fi", DateTimePickerClientBundle.INSTANCE.fi()),
040        FR("fr", DateTimePickerClientBundle.INSTANCE.fr()),
041        HE("he", DateTimePickerClientBundle.INSTANCE.he()),
042        HR("hr", DateTimePickerClientBundle.INSTANCE.hr()),
043        HU("hu", DateTimePickerClientBundle.INSTANCE.hu()),
044        ID("id", DateTimePickerClientBundle.INSTANCE.id()),
045        IS("is", DateTimePickerClientBundle.INSTANCE.is()),
046        IT("it", DateTimePickerClientBundle.INSTANCE.it()),
047        JA("ja", DateTimePickerClientBundle.INSTANCE.ja()),
048        KO("ko", DateTimePickerClientBundle.INSTANCE.ko()),
049        KR("kr", DateTimePickerClientBundle.INSTANCE.kr()),
050        LT("lt", DateTimePickerClientBundle.INSTANCE.lt()),
051        LV("lv", DateTimePickerClientBundle.INSTANCE.lv()),
052        MS("ms", DateTimePickerClientBundle.INSTANCE.ms()),
053        NB("nb", DateTimePickerClientBundle.INSTANCE.nb()),
054        NL("nl", DateTimePickerClientBundle.INSTANCE.nl()),
055        NO("no", DateTimePickerClientBundle.INSTANCE.no()),
056        PL("pl", DateTimePickerClientBundle.INSTANCE.pl()),
057        PT_BR("pt-BR", DateTimePickerClientBundle.INSTANCE.pt_BR()),
058        PT("pt", DateTimePickerClientBundle.INSTANCE.pt()),
059        RO("ro", DateTimePickerClientBundle.INSTANCE.ro()),
060        RS_LATIN("rs-latin", DateTimePickerClientBundle.INSTANCE.rs_latin()),
061        RS("rs", DateTimePickerClientBundle.INSTANCE.rs()),
062        RU("ru", DateTimePickerClientBundle.INSTANCE.ru()),
063        SK("sk", DateTimePickerClientBundle.INSTANCE.sk()),
064        SL("sl", DateTimePickerClientBundle.INSTANCE.sl()),
065        SV("sv", DateTimePickerClientBundle.INSTANCE.sv()),
066        SW("sw", DateTimePickerClientBundle.INSTANCE.sw()),
067        TH("th", DateTimePickerClientBundle.INSTANCE.th()),
068        TR("tr", DateTimePickerClientBundle.INSTANCE.tr()),
069        UA("ua", DateTimePickerClientBundle.INSTANCE.ua()),
070        UK("uk", DateTimePickerClientBundle.INSTANCE.uk()),
071        ZH_CN("zh-CN", DateTimePickerClientBundle.INSTANCE.zh_CN()),
072        ZH_TW("zh-TW", DateTimePickerClientBundle.INSTANCE.zh_TW()),
073        EN("en", null); // Base language, don't need another file
074    
075        private final String code;
076        private final TextResource js;
077    
078        private DateTimePickerLanguage(final String code, final TextResource js) {
079            this.js = js;
080            this.code = code;
081        }
082    
083        public String getCode() {
084            return code;
085        }
086    
087        public TextResource getJs() {
088            return js;
089        }
090    }