net.sf.sfac.lang.MultiLingualText Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfac-utils Show documentation
Show all versions of sfac-utils Show documentation
This project is the model side of the Swing Framework and Components (SFaC).
If your doing a clean separation between model (or business) and view (or GUI or rendering) parts of your application,
(like in the MVC pattern), then the only classes of SFaC your model can access are in this project.
On the other hand, the classes in sfac-core project are GUI-specific and should not be known by your model.
The newest version!
/*-------------------------------------------------------------------------
Copyright 2009 Olivier Berlanger
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-------------------------------------------------------------------------*/
package net.sf.sfac.lang;
import java.util.Locale;
/**
* Interface for object holding a text translatable in several locales.
*
* @author Olivier Berlanger
*/
public interface MultiLingualText {
/**
* Get the value of the text for the default locale.
*
* @return the value of the text for the default locale.
*/
public String getText();
/**
* Get the value of the text for the specified locale.
* If a specific value for the given locale is not available, this method tries to find the most appropriate translation with
* the usual ResourceBundle
mechanism.
*
* @return the value of the text for the specified locale.
*/
public String getText(Locale loc);
/**
* Get the value of the text for the specified locale.
* If a specific value for the given locale is not available, this method tries to find the most appropriate translation with
* the usual ResourceBundle
mechanism.
*
* @param localeId
* the ID of the locale (language_country_variant)
* @return the value of the text for the specified locale.
*/
public String getText(String localeId);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy