|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.editor.langed.LangManager
public class LangManager
LangManager
Copyright (c) Formaria Ltd., 2001-2006, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.
$Revision: 1.7 $
| Constructor Summary | |
|---|---|
LangManager(boolean _bIsStandalone)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getLangName()
|
int |
getNumStrings()
Gets the number of strings in the current language. |
java.lang.String |
getString(int id)
Gets a string from the language. |
java.lang.String |
getSubString(int id)
Gets a string from the language, calls getString. |
java.lang.String |
getSubString(java.lang.String substitution)
Gets a string from the language, calls getString. |
void |
read(java.lang.String driver,
java.lang.String url,
java.lang.String userName,
java.lang.String password,
java.lang.String code,
java.lang.String tableName,
boolean doSubstitutions)
Deprecated. uses an old file format public void read( String code ) throws IOException { currentLang = new Language(); String file = url.toString(); String fs = System.getProperty( "file.separator" ); int index = file.lastIndexOf( fs ); if ( index == -1 ) { index = file.lastIndexOf( "/" ); if ( index == -1 ) index = file.lastIndexOf( "\\" ); } file = file.substring( 0, index + 1 ); code += ".jln"; BufferedReader is; //file += "lang/"; file += code; URL url2 = new URL( file ); is = new BufferedReader( new InputStreamReader( url2.openStream())); currentLang.read( is, false ); is.close(); // Read the substrings if ( index == -1 ) { index = file.lastIndexOf( "/" ); if ( index == -1 ) index = file.lastIndexOf( "\\" ); } file = file.substring( 0, index + 1 ); file += "sub.jln"; URL url3 = new URL( file ); is = new BufferedReader( new InputStreamReader( url3.openStream())); subStrings.read( is, true ); is.close(); } |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LangManager(boolean _bIsStandalone)
| Method Detail |
|---|
public void read(java.lang.String driver,
java.lang.String url,
java.lang.String userName,
java.lang.String password,
java.lang.String code,
java.lang.String tableName,
boolean doSubstitutions)
public java.lang.String getString(int id)
id - the ID of the requird string.
public int getNumStrings()
public java.lang.String getSubString(int id)
id - the ID of the required string.
public java.lang.String getSubString(java.lang.String substitution)
subString - the substitution string.
public java.lang.String getLangName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||