001    package org.gwtbootstrap3.extras.fullcalendar.client.ui;
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.fullcalendar.client.FullCalendarClientBundle;
025    
026    /**
027     * Convenient encapsulation of all language options for <code>FullCalendar</code>
028     *
029     * @author Jeff Isenhart
030     * @see http://arshaw.com/fullcalendar/docs/text/lang/
031     */
032    
033    public enum Language {
034        ArabicMorocan("ar-ma", FullCalendarClientBundle.INSTANCE.getArabicMorocan()),
035        Arabic("ar", FullCalendarClientBundle.INSTANCE.getArabic()),
036        Bulgarian("bg", FullCalendarClientBundle.INSTANCE.getBulgarian()),
037        Catalan("ca", FullCalendarClientBundle.INSTANCE.getCatalan()),
038        Czech("cs", FullCalendarClientBundle.INSTANCE.getCzech()),
039        Danish("da", FullCalendarClientBundle.INSTANCE.getDanish()),
040        German("de", FullCalendarClientBundle.INSTANCE.getGerman()),
041        Greek("el", FullCalendarClientBundle.INSTANCE.getGreek()),
042        EnglishAustralian("en-au", FullCalendarClientBundle.INSTANCE.getEnglishAustralian()),
043        EnglishCanadian("en-ca", FullCalendarClientBundle.INSTANCE.getEnglishCanadian()),
044        EnglishBritish("en-gb", FullCalendarClientBundle.INSTANCE.getEnglishBritish()),
045        Spanish("es", FullCalendarClientBundle.INSTANCE.getSpanish()),
046        Farsi("fa", FullCalendarClientBundle.INSTANCE.getFarsi()),
047        Finnish("fi", FullCalendarClientBundle.INSTANCE.getFinnish()),
048        FrenchCanadian("fr-ca", FullCalendarClientBundle.INSTANCE.getFrenchCanadian()),
049        French("fr", FullCalendarClientBundle.INSTANCE.getFrench()),
050        Hindi("hi", FullCalendarClientBundle.INSTANCE.getHindi()),
051        Croatian("hr", FullCalendarClientBundle.INSTANCE.getCroatian()),
052        Hungarian("hu", FullCalendarClientBundle.INSTANCE.getHungarian()),
053        Italian("it", FullCalendarClientBundle.INSTANCE.getItalian()),
054        Japanese("ja", FullCalendarClientBundle.INSTANCE.getJapanese()),
055        Korean("ko", FullCalendarClientBundle.INSTANCE.getKorean()),
056        Lithuanian("lt", FullCalendarClientBundle.INSTANCE.getLithuanian()),
057        Latvian("lv", FullCalendarClientBundle.INSTANCE.getLatvian()),
058        Dutch("nl", FullCalendarClientBundle.INSTANCE.getDutch()),
059        Polish("pl", FullCalendarClientBundle.INSTANCE.getPolish()),
060        PortugeseBrazil("pt-br", FullCalendarClientBundle.INSTANCE.getPortugeseBrazil()),
061        Portugese("pt", FullCalendarClientBundle.INSTANCE.getPortugese()),
062        Romanian("ro", FullCalendarClientBundle.INSTANCE.getRomanian()),
063        Russian("ru", FullCalendarClientBundle.INSTANCE.getRussian()),
064        Slovak("sk", FullCalendarClientBundle.INSTANCE.getSlovak()),
065        Slovenian("sl", FullCalendarClientBundle.INSTANCE.getSlovenian()),
066        SerbianCyrillic("sr-cyr", FullCalendarClientBundle.INSTANCE.getSerbianCyrillic()),
067        Serbian("sr", FullCalendarClientBundle.INSTANCE.getSerbian()),
068        Sweedish("sv", FullCalendarClientBundle.INSTANCE.getSweedish()),
069        Thai("th", FullCalendarClientBundle.INSTANCE.getThai()),
070        Turkish("tr", FullCalendarClientBundle.INSTANCE.getTurkish()),
071        Ukrainian("uk", FullCalendarClientBundle.INSTANCE.getUkrainian()),
072        Vietnamese("vi", FullCalendarClientBundle.INSTANCE.getVietnamese()),
073        ChineseChina("zh-cn", FullCalendarClientBundle.INSTANCE.getChineseChina()),
074        ChineseTaiwan("zh-tw", FullCalendarClientBundle.INSTANCE.getChineseTaiwan());
075    
076        private final String code;
077        private final TextResource resource;
078    
079        private Language(final String code, final TextResource resource) {
080            this.code = code;
081            this.resource = resource;
082        }
083    
084        public String getCode() {
085            return code;
086        }
087    
088        public TextResource getResource() {
089            return resource;
090        }
091    
092    }