org.apache.avalon.fortress.examples.components
Interface Translator
- All Known Implementing Classes:
- TranslatorImpl
public interface Translator
Translator component. This component provides simple translations of given
keys, identified by language name.
- Version:
- CVS $Revision: 1.6 $ $Date: 2004/02/24 22:31:21 $
- Author:
- Avalon Development Team
Field Summary |
static String |
ROLE
Role identifying Component |
ROLE
static final String ROLE
- Role identifying Component
getSupportedLanguages
String[] getSupportedLanguages(String key)
getSupportedLanguages
returns an array of String
objects detailing which languages are supported for the given
key.
- Parameters:
key
- a String
value identifying a translation
- Returns:
- a
String[]
array containing available language
translations for the given key
getTranslation
String getTranslation(String key,
String language)
getTranslation
obtains a translation for a given
key in a given language. The language parameter must be listed
in getSupportedLanguages
.
- Parameters:
key
- a String
value identifying a translationlanguage
- a String
value identifying the language
- Returns:
- translated text
Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.