|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.nand.util.i18n.PropsFilePseudoLocalizer
public class PropsFilePseudoLocalizer
Given a simple .properties file, pseudo-localize its values. English filename.properties becomes filename_en_AA.properties; other languages' filename_la.properties becomes filename_la_AA.properties.
Runs each property value through StringUtil.pseudolocalise(String) from the JBoss Ant-Gettext utilities.
| Constructor Summary | |
|---|---|
PropsFilePseudoLocalizer()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
With 1 argument, pseudolocalize that filename's values. |
static java.lang.String |
makePseudoPropFilename(java.lang.String srcPropFilename)
Make a filename for a pseudo locale properties file. |
static void |
pseudoLocalizeFile(java.io.File srcPropFile,
java.lang.String destPropFilename)
Pseudolocalize a source file to a destination. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropsFilePseudoLocalizer()
| Method Detail |
|---|
public static final java.lang.String makePseudoPropFilename(java.lang.String srcPropFilename)
throws java.lang.IllegalArgumentException
srcPropFilename - Source filename to localize from, ending with ".properties".
English filename.properties becomes filename_en_AA.properties;
other languages' filename_la.properties becomes filename_la_AA.properties.
Source filename format filename_la_COUNTRY.properties is not supported.
srcPropFilename, see above for details
java.lang.IllegalArgumentException - if srcPropFilename contains more than 1 underscore ('_')
public static void pseudoLocalizeFile(java.io.File srcPropFile,
java.lang.String destPropFilename)
throws java.io.IOException
srcPropFilename - Source file to localize from, filename ending with ".properties"destPropFilename - Pseudo filename to localize to, from makePseudoPropFilename(String)
java.io.IOException - if an error occurs reading or writing the filespublic static void main(java.lang.String[] args)
Return codes:
System.err
args - Single filename to pseudolocalize, with same rules as #pseudoLocalizeFile(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||