org.mmbase.module.gui.html
Class MMLanguage
java.lang.Object
org.mmbase.util.functions.FunctionProvider
org.mmbase.util.functions.DescribedFunctionProvider
org.mmbase.module.Module
org.mmbase.module.ProcessorModule
org.mmbase.module.gui.html.MMLanguage
- All Implemented Interfaces:
- Descriptor
public class MMLanguage
- extends ProcessorModule
Module for multi-language support.
This module reads (english) terms and their localized value(s) from a
configuration file.
It can then return the localized terms when needed.
- Version:
- $Id: MMLanguage.java 35335 2009-05-21 08:14:41Z michiel $
- Author:
- Daniel Ockeloen
- Application:
- SCAN - Removing this from Core requires changes in Casting
|
Field Summary |
(package private) String |
languagePrefix
The language currently in use. |
(package private) MMBase |
mmb
Reference to the MMbase module. |
|
Constructor Summary |
MMLanguage()
Basic constructor |
| Methods inherited from class org.mmbase.module.Module |
addInitParameters, checkModules, getInitParameter, getInitParameter, getInitParameter, getInitParameters, getInitParameters, getMaintainer, getModule, getModule, getModule, getModule, getModuleInfo, getModuleLoader, getModuleReader, getModuleReader, getModules, getState, getStates, getVersion, hasModule, hasStarted, loadInitParameters, loadInitParameters, maintainance, setInitParameter, setMaintainer, setState, setVersion, shutdown, shutdownModules, startModule, startModules |
| Methods inherited from class org.mmbase.util.functions.DescribedFunctionProvider |
getDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName, setName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mmb
MMBase mmb
- Reference to the MMbase module.
languagePrefix
String languagePrefix
- The language currently in use.
MMLanguage
public MMLanguage()
- Basic constructor
init
public void init()
- Description copied from class:
ProcessorModule
- Initializes the module.
Init must be overridden to read the environment variables it needs.
This method is called by Module.startModule(), which makes sure it is not called
more than once. You should not call init() directly, call startModule() instead.
- Overrides:
init in class ProcessorModule
replace
public String replace(PageInfo sp,
String cmds)
- Handles the $MOD-MMLANGUAGE-commands.
Commands handled by this method are:
- GET-term : translates 'term' to the current language, if possible
(otherwise returns the term unchanged).
- LANGUAGE: returns the language prefix currently in use.
- Overrides:
replace in class ProcessorModule
- Parameters:
sp - the current page contextcmds - the tokenized command
- Returns:
- the result of the command as a String
getFromCoreEnglish
public String getFromCoreEnglish(String term)
MMBase 2.0-SNAPSHOT - null