net.sourceforge.jbizmo.commons.richclient.javafx.i18n.I18NJavaFX Maven / Gradle / Ivy
/*
* This file is part of JBizMo, a set of tools, libraries and plug-ins
* for modeling and creating Java-based enterprise applications.
* For more information visit:
*
* http://sourceforge.net/projects/jbizmo/
*
* This software is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even 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 software; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.sourceforge.jbizmo.commons.richclient.javafx.i18n;
import java.util.Locale;
import java.util.ResourceBundle;
import net.sourceforge.jbizmo.commons.richclient.i18n.AbstractI18NService;
import net.sourceforge.jbizmo.commons.richclient.i18n.I18N;
/**
*
* Utility class for translation of text fragments within library.
*
*
* Copyright 2015 (C) by Martin Ganserer
*
* @author Martin Ganserer
* @version 1.0.0
*/
public class I18NJavaFX extends I18N
{
private static final String BUNDLE = "net.sourceforge.jbizmo.commons.richclient.javafx.i18n.dict";
private static I18NJavaFX trans = null;
/**
* @return the shared instance
*/
public static synchronized AbstractI18NService getInstance()
{
if(trans == null)
trans = new I18NJavaFX();
return trans;
}
/**
* Private constructor
*/
private I18NJavaFX()
{
super();
}
/**
* @return the resource bundle for the default locale
*/
public static ResourceBundle getResourceBundle()
{
return ResourceBundle.getBundle(BUNDLE, Locale.getDefault());
}
/*
* (non-Javadoc)
* @see net.sourceforge.jbizmo.commons.richclient.i18n.I18N#getBundle()
*/
@Override
public String getBundle()
{
return BUNDLE;
}
}