001    package org.gwtbootstrap3.extras.datepicker.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.datepicker.client.DatePickerClientBundle;
025    
026    /**
027     * @author Joshua Godi
028     */
029    public enum DatePickerLanguage {
030        AR("ar", DatePickerClientBundle.INSTANCE.ar()),
031        BG("bg", DatePickerClientBundle.INSTANCE.bg()),
032        CA("ca", DatePickerClientBundle.INSTANCE.ca()),
033        CS("cs", DatePickerClientBundle.INSTANCE.cs()),
034        DA("da", DatePickerClientBundle.INSTANCE.da()),
035        DE("de", DatePickerClientBundle.INSTANCE.de()),
036        EL("el", DatePickerClientBundle.INSTANCE.el()),
037        EN_GB("en-GB", DatePickerClientBundle.INSTANCE.en_GB()),
038        ES("es", DatePickerClientBundle.INSTANCE.es()),
039        ET("et", DatePickerClientBundle.INSTANCE.et()),
040        EU("eu", DatePickerClientBundle.INSTANCE.eu()),
041        FA("fa", DatePickerClientBundle.INSTANCE.fa()),
042        FO("fo", DatePickerClientBundle.INSTANCE.fo()),
043        FI("fi", DatePickerClientBundle.INSTANCE.fi()),
044        FR("fr", DatePickerClientBundle.INSTANCE.fr()),
045        FR_CH("fr-CH", DatePickerClientBundle.INSTANCE.fr_CH()),
046        GL("gl", DatePickerClientBundle.INSTANCE.gl()),
047        HE("he", DatePickerClientBundle.INSTANCE.he()),
048        HR("hr", DatePickerClientBundle.INSTANCE.hr()),
049        HU("hu", DatePickerClientBundle.INSTANCE.hu()),
050        HY("hy", DatePickerClientBundle.INSTANCE.hy()),
051        ID("id", DatePickerClientBundle.INSTANCE.id()),
052        IS("is", DatePickerClientBundle.INSTANCE.is()),
053        IT("it", DatePickerClientBundle.INSTANCE.it()),
054        IT_CH("it-CH", DatePickerClientBundle.INSTANCE.it_CH()),
055        JA("ja", DatePickerClientBundle.INSTANCE.ja()),
056        KA("ka", DatePickerClientBundle.INSTANCE.ka()),
057        KH("kh", DatePickerClientBundle.INSTANCE.kh()),
058        KK("kk", DatePickerClientBundle.INSTANCE.kk()),
059        KR("kr", DatePickerClientBundle.INSTANCE.kr()),
060        LT("lt", DatePickerClientBundle.INSTANCE.lt()),
061        LV("lv", DatePickerClientBundle.INSTANCE.lv()),
062        MK("mk", DatePickerClientBundle.INSTANCE.mk()),
063        MS("ms", DatePickerClientBundle.INSTANCE.ms()),
064        NB("nb", DatePickerClientBundle.INSTANCE.nb()),
065        NL("nl", DatePickerClientBundle.INSTANCE.nl()),
066        NL_BE("nl-BE", DatePickerClientBundle.INSTANCE.nl_BE()),
067        NO("no", DatePickerClientBundle.INSTANCE.no()),
068        PL("pl", DatePickerClientBundle.INSTANCE.pl()),
069        PT("pt", DatePickerClientBundle.INSTANCE.pt()),
070        PT_BR("pt-BR", DatePickerClientBundle.INSTANCE.pt_BR()),
071        RO("ro", DatePickerClientBundle.INSTANCE.ro()),
072        RS("rs", DatePickerClientBundle.INSTANCE.rs()),
073        RS_LATIN("rs-latin", DatePickerClientBundle.INSTANCE.rs_latin()),
074        RU("ru", DatePickerClientBundle.INSTANCE.ru()),
075        SK("sk", DatePickerClientBundle.INSTANCE.sk()),
076        SL("sl", DatePickerClientBundle.INSTANCE.sl()),
077        SQ("sq", DatePickerClientBundle.INSTANCE.sq()),
078        SR("sr", DatePickerClientBundle.INSTANCE.sr()),
079        SR_LATIN("sr-latin", DatePickerClientBundle.INSTANCE.sr_latin()),
080        SV("sv", DatePickerClientBundle.INSTANCE.sv()),
081        SW("sw", DatePickerClientBundle.INSTANCE.sw()),
082        TH("th", DatePickerClientBundle.INSTANCE.th()),
083        TR("tr", DatePickerClientBundle.INSTANCE.tr()),
084        VI("vi", DatePickerClientBundle.INSTANCE.vi()),
085        UK("uk", DatePickerClientBundle.INSTANCE.uk()),
086        ZH_CN("zh-CN", DatePickerClientBundle.INSTANCE.zh_CN()),
087        ZH_TW("zh-TW", DatePickerClientBundle.INSTANCE.zh_TW()),
088        EN("en", null); // Base language, don't need another file
089    
090        private final String code;
091        private final TextResource js;
092    
093        private DatePickerLanguage(final String code, final TextResource js) {
094            this.js = js;
095            this.code = code;
096        }
097    
098        public String getCode() {
099            return code;
100        }
101    
102        public TextResource getJs() {
103            return js;
104        }
105    }