All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.manydesigns.portofino.stripes.LocalePicker Maven / Gradle / Ivy

There is a newer version: 4.2.12
Show newest version
/*
* Copyright (C) 2005-2014 ManyDesigns srl.  All rights reserved.
* http://www.manydesigns.com/
*
* Unless you have purchased a commercial license agreement from ManyDesigns srl,
* the following license terms apply:
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the GPL
* as it is applied to this software. View the full text of the
* exception in file OPEN-SOURCE-LICENSE.txt in the directory of this
* software distribution.
*
* This program is distributed WITHOUT ANY WARRANTY; and without the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
* or write to:
* Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330,
* Boston, MA  02111-1307  USA
*
*/

package com.manydesigns.portofino.stripes;

import net.sourceforge.stripes.config.Configuration;
import net.sourceforge.stripes.localization.DefaultLocalePicker;

import java.util.Locale;

/**
 * @author Paolo Predonzani     - [email protected]
 * @author Angelo Lupo          - [email protected]
 * @author Giampiero Granatella - [email protected]
 * @author Alessio Stalla       - [email protected]
 */
public class LocalePicker extends DefaultLocalePicker {
    public static final String copyright =
            "Copyright (c) 2005-2014, ManyDesigns srl";

    @Override
    public void init(Configuration configuration) throws Exception {
        super.init(configuration);

        for(Locale locale : locales) {
            //Set UTF-8 as the default encoding
            if(!encodings.containsKey(locale)) {
                encodings.put(locale, "UTF-8");
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy