About this task
The database factory default values can
be localized for a factory setup, enabling the use of one or more
locales in addition to the installed locale.
If a resource
is missing for a locale, the lookup goes to the respective language
resource, and if not found there, the lookup goes to the default resource.
For example, if a French Canadian user logs in, the system will look
for translation of Canadian French resources. If not found, the system
looks for translation of French resources. If not found, the default
resource is used. So with the locale fr_CA, if the bundle entry is
not found, the lookup will proceed in the following order:
- bundlefile_fr_CA.properties
- bundlefile_fr.properties
- bundlefile.properties
This enables you to have bundle files at the language level that
can be used for locales with the same language. For example, for fr_FR
and fr_CA, you can maintain common language files with the extension
fr.
To localize the factory default XML and user-configured
attributes for multiple locales:
- Create the necessary locale using the Applications Manager.
- Run the LocalizedStringReconciler tool from <INSTALL_DIR>/bin in
either the extract_errorcause_db mode or the EXPORT mode for UNIX and Windows as described here. Running it in
the extract_errorcause_db mode extracts the error cause and error
action literals, and a ycplocalizedstrings_xx_XX_db.properties file
is created,
where "xx" is the language
code and "XX" is the country or region code.
For UNIX:
sci_ant.sh -f localizedstringreconciler.xml export
-Ddestdir=<INSTALL_DIR>/repository/factorysetup/complete_installation/XMLS
For Windows:
sci_ant.cmd -f localizedstringreconciler.xml export
-Ddestdir=<INSTALL_DIR>\repository\factorysetup\complete_installation\XMLS
This processes the entity XMLs and
identifies the missing literals for the columns that can be localized
in the YFS_LOCALIZED_STRINGS table.
The data
is then exported to one or more properties files
depending on the country or region, language, and variant.
To export for a specific locale, use optional parameters
language, and country. This usage is as follows:
For UNIX:
sci_ant.sh -f localizedstringreconciler.xml export
-Ddestdir=<INSTALL_DIR>/repository/factorysetup/complete_installation
/XMLS -Dlanguage=fr -Dcountry=FR
For Windows:
sci_ant.cmd -f localizedstringreconciler.xml export
-Ddestdir=<INSTALL_DIR>\repository\factorysetup\complete_installation
\XMLS -Dlanguage=fr -Dcountry=FR
Note: In an instance where the YFS_LOCALE
table contains two entries other than the base locale, two files are
created. For example, if fr_FR (representing French,
and France) is the locale, a file named en_US_ycpmissinglocalizedstrings_fr_FR.properties is
created in the destination folder specified (destdir).
- Edit the aa_BB_ycpmissinglocalizedstrings_xx_YY.properties file
for the relevant locale, in the <INSTALL_DIR>/repository/factorysetup/complete_installation/XMLS/<xx_YY> directory,
where aa is the language code for the "From" locale, BB is
the country or region code for the "From" locale, xx is
the language code for the "To" locale, and YY is
the country or region code for the "To" locale.
The aa_BB_ycpmissinglocalizedstrings_xx_YY.properties file
contains entries in the following format:
Acceptance_Process=
Add_Service=
Line=
Add relevant translation values to
the entries. Following is an example for French literals:
Acceptance_Process=Processus d'acceptation
Add_Service=Ajouter service
Line=Ligne
- Save the modified aa_BB_ycpmissinglocalizedstrings_xx_YY.properties file
in the escaped Unicode format. In this file, all the multi-byte characters
should be in escaped Unicode format. The following example displays
the requisite formatting for lines in this file:
For the Japanese locale: Add\Line=\u660e\u7d30\u306e\u8ffd\u52a0
For the French locale: Invalid\inventory\operation.=Op\u00e9ration
d'inventaire non valide.
- Run the LocalizedStringReconciler tool from <INSTALL_DIR>/bin in
IMPORTTEST mode as described here. This ensures that there are no
problems during the import process.
For UNIX:
sci_ant.sh -f localizedstringreconciler.xml importtest
-Dsrc=<INSTALL_DIR>/repository/factorysetup/complete_installation/XMLS
For Windows:
sci_ant.cmd -f localizedstringreconciler.xml importtest
-Dsrc=<INSTALL_DIR>\repository\factorysetup\complete_installation\XMLS
You can also specifically provide the
Dbasefilename parameter in the localizedstringreconciler.xml file.
For example:
For UNIX:
sci_ant.sh -f localizedstringreconciler.xml importtest
-Dsrc=<INSTALL_DIR>/repository/factorysetup/complete_installation/XMLS
-Dbasefilename=ycpmissinglocalizedstrings
For Windows:
sci_ant.cmd -f localizedstringreconciler.xml importtest
-Dsrc=<INSTALL_DIR>\repository\factorysetup\complete_installation\XMLS
-Dbasefilename=ycpmissinglocalizedstrings
Note: The IMPORTTEST functionality of
the LocalizedStringReconciler tool helps you to test the import process
and roll back the changes, if required. The IMPORTTEST mode enables
you to test the import process and verify if any strings cannot be
added to the appropriate fields in the database for any reason, for
example, extensive length.
This is particularly important when you
are upgrading from a previous release because, after a base language
is switched, the import process will place the translation into the
database.
The function of IMPORTTEST is similar to SWITCHTEST,
in that, just as SWITCHTEST helps a new customer verify whether the
switch process will be successful, IMPORTTEST helps a customer who
is upgrading to verify whether the import process will be successful.
- Run the LocalizedStringReconciler tool from <INSTALL_DIR>/bin in
IMPORT mode as described here. This inserts the values specified in
the properties file into the database.
For UNIX:
sci_ant.sh -f localizedstringreconciler.xml import
-Dsrc=<INSTALL_DIR>/repository/factorysetup/complete_installation/XMLS
For Windows:
sci_ant.cmd -f localizedstringreconciler.xml import
-Dsrc=<INSTALL_DIR>\repository\factorysetup\complete_installation\XMLS
You can also specifically provide the
Dbasefilename parameter in the localizedstringreconciler.xml file.
For example:
For UNIX:
sci_ant.sh -f localizedstringreconciler.xml import
-Dsrc=<INSTALL_DIR>/repository/factorysetup/complete_instal
lation/XMLS
-Dbasefilename=ycpmissinglocalizedstrings
For Windows:
sci_ant.cmd -f localizedstringreconciler.xml import
-Dsrc=<INSTALL_DIR>\repository\factorysetup\complete_instal
lation\XMLS
-Dbasefilename=ycpmissinglocalizedstrings
Note: By default, when the localizedstringreconciler tool
is run without passing the -Dbasefilename parameter, the tool picks
up and runs the ycplocalizedstrings file, which contains
the Sterling Selling and
Fulfillment Foundation Factory
Setup.
Note: For customers who are upgrading
from previous versions, some error codes will not be translated when
a new language pack is applied, as error codes will not change and
as such will not be in the latest language pack. To resolve this,
you have to:
- Run the localizedstringreconciler tool
in export mode
- Translate old/custom error codes
- Run the tool in import mode to have your translations
added in the database.