| java.lang.Object com.salmonllc.localizer.Localizer com.salmonllc.localizer.DBLocalizer
All known Subclasses: com.salmonllc.localizer.EscapeDBLocalizer,
DBLocalizer | public class DBLocalizer extends Localizer (Code) | | The DB Localizer is a concrete implementation of the Localizer class. This will load the localization keys from a database table
|
Method Summary | |
protected boolean | loadData(String appName, String language) Loads the data from a database table. |
DBLocalizer | public DBLocalizer()(Code) | | Constructs a new Localizer
|
DBLocalizer | public DBLocalizer(boolean translateEscapes)(Code) | | Constructs a new Localizer
Parameters: translateEscapes - true to translate escape sequences to their propery unicode representation |
loadData | protected boolean loadData(String appName, String language)(Code) | | Loads the data from a database table. It uses the following properties from the application or system.property file
LocaleTable=The table where the localization data comes from
LocaleLangColumn=The column in the table that specifies the language
LocaleKeyColumn=The column in the table that specifies the resource key
LocaleResourceColumn=The column in the table that specifies the resource key
LocaleAppColumn=The column in the table that specifies which application a key is for (optional: If left out it won't use app name as part of the selection)
LocaleDBProfile=The database profile to use to load the data (optional: if left out it will use the default prrofile for the application
The method returns true if it succeeds and false if not.
|
|
|