Output File Names |
Each file type has specific rules where the localized output files should be created. In most cases, the output files are created in the subdirectories of that directory where the original files exist. For example, if your original file is C:\Samples\Sport.xml then the German output file is created to C:\Samples\de\Sport.xml and Japanese to C:\Samples\ja\Sport.xml. Obviously, you might want to change this. Soluling contains very flexible ways to configure both the output directories and the output file names.
The above screenshot is from the Output sheet of an XML source. The XML source can either create localized files where there is one localized XML file for each language or one multilingual XML file that contains elements in several languages. In the above image, localized files have been turned on, and multilingual ones have been turned off (default). Below the check box there is a combo box, that contains the target file pattern. It specifies what the output file names are used. The target file pattern is <id>\<file>. What does this mean? The target file pattern can contain plain characters and special items. Each item is marked with < > characters. For example <id> means a language id. \ means that the previous part is a subdirectory of the output directory. <file> is the file name without path. <id>\<file> instruction tell Soluling to create each output file in a language-specific directory and using the same file names as the original file. The multilingual target file pattern (current disabled) contains plain characters "all\". This means that the multilingual file (if enabled) would be written to the all subdirectory of the output directory. The final output file name is a combination of the output directory and the output file pattern. In the above sample, the Finnish output file would be D:\NT\Deploy\Samples\XML\Sport\fi\Sport.xml.
There can be two kinds of items in patterns. The first kinds of items specify the directory and file name. Another kind of item specifies a language.
These items are used to specify the output file name. These items can only be used in the output file patterns - not in output directory. File and directory items are:
Parameter | Description |
---|---|
<parent> | Item is replaced with the relative parent directory to the source file, including the last backslash.C:\Files\SubFiles\Sport.exe -> C:\Files\ |
<dir> | Item is replaced with the relative directory to the source file, including the last backslash. |
<file> | Item is replaced with the original file name with extension.C:\Files\Sport.exe -> Sport.exe |
<body> | Item is replaced with the original file name without extension.C:\Files\Sport.exe -> Sport |
<ext> | Item is replaced with the original file extension without a period.C:\Files\Sport.exe -> exe |
Note! If a pattern does not contain <dir> parameter, Soluling automatically adds it to the beginning of the pattern before processing it.
These items are used to specify the language part of the output files. These items can be used in both output directories and in output file patterns. Language items are:
Parameter | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
<id> | Standard language id is used. For example, "en" is for English, "en-US" is for English (United States), "zh" is for Simplified Chinese, and "zh-Hant" is for Traditional Chinese. The default Chinese script is Simplified Chinese. This is why the language code of Simplified Chinese is just "zh" but Traditional Chinese uses a script part, "zh-Hant". If you want both Chinese to contain script part, place multi- prefix to id: <multi-id>. Learn more about prefixes later on this page. |
||||||||
<leg> | Legacy locale code is used. It is a combination of language and country. The syntax isll[-CC[-variant]] where
|
||||||||
<und> | As above, but underline separator is used instead of a hyphen. For example, "en" is for English, "en_US" is for English (United States), and "zh_CH" is for Simplified Chinese. |
||||||||
<and> | Android language ids. The syntax isll[-rCC] where
|
||||||||
<net> | NET culture code is used. It is a combination of language and country. The syntax isll[-Ssss][-CC[C]] (.NET 4.0 or later)ll[-CC[C][-SSSS]] (.NET 2 and 3.x)where
<net> with .NET 4.0 or later is identical to <ietf>. |
||||||||
<win> | Windows locale code is used. It contains two or three upper case characters. For example, "EN" is for English, "ENU" is for English (United Stated), and "CHS" is for Simplified Chinese. |
||||||||
<mfc> | MFC locale code is used. It contains three upper case characters. For example, "ENE" is for English, "ENG" is for English (United Kingdom), and "CHS" is for Simplified Chinese. |
||||||||
<nls> | Windows locale id is used. It is an integer number containing the primary and sub language ids. | ||||||||
<hex> | As above but four digit hex value is used instead of a decimal value. | ||||||||
<eng> | English language/locale name. |
In addition to above code, you can append the following prefixes into id, leg, and und code items.
Feature code | Description | Codes where it can be used |
---|---|---|
multi- | Those languages that can use more than one script will always have a script part. For example, Simplified Chinese would be zh-Hans instead of zh. |
<id> |
script- | All languages will have a script part. For example, English would be en-Latn instead of en. |
<id> |
lower- | Id is all lower case characters. | <id>, <leg>, <und> |
upper- | Id is all upper case characters. | <id>, <leg>, <und> |
These codes can not be used standalone but must always be added before id, leg, or und codes. For example, lower-id is just like id, but all parts use lower case characters (e.g., en-us vs. en-US).
You can combine any amount of plain characters and items. The following table shows how the original file C:\Files\Sport.exe maps with different output file patterns and languages.
Pattern | Original file | German file | German (Germany) file | Japanese file | Simplified Chinese file | Traditional Chinese file | Notes |
---|---|---|---|---|---|---|---|
<id>\<file> | C:\Sport.exe | C:\de\Sport.exe | C:\de-DE\Sport.exe | C:\ja\Sport.exe | C:\zh\Sport.exe | C:\zh-Hant\Sport.exe | Default output file in most cases. |
<multi-id>\<file> | C:\Sport.exe | C:\de\Sport.exe | C:\de-DE\Sport.exe | C:\ja\Sport.exe | C:\zh-Hans\Sport.exe | C:\zh-Hant\Sport.exe | |
<script-id>\<file> | C:\Sport.exe | C:\de-Latn\Sport.exe | C:\de-Latn-DE\Sport.exe | C:\ja-Jpan\Sport.exe | C:\zh-Hans\Sport.exe | C:\zh-Hant\Sport.exe | |
<upper-id>\<file> | C:\Sport.exe | C:\DE\Sport.exe | C:\DE-DE\Sport.exe | C:\JA\Sport.exe | C:\ZH\Sport.exe | C:\ZH-HANT\Sport.exe | Id is all upper case |
<lower-id>\<file> | C:\Sport.exe | C:\de\Sport.exe | C:\de-de\Sport.exe | C:\ja\Sport.exe | C:\zh\Sport.exe | C:\zh-hant\Sport.exe | Id is all lower case |
<body>_<id>.<ext> | C:\Sport.exe | C:\Sport_de.exe | C:\Sport_de-DE.exe | C:\Sport_ja.exe | C:\Sport_zh.exe | C:\Sport_zh-Hant.exe | |
<body>_<id>.<ext> | C:\Sport_en.exe | C:\Sport_de.exe | C:\Sport_de-DE.exe | C:\Sport_ja.exe | C:\Sport_zh.exe | C:\Sport_zh-Hant.exe | The original file has a language id part, so it will be replaced with the localized id. |
<body>.<id> | C:\Sport.exe | C:\Sport.de | C:\Sport.de-DE | C:\Sport.ja | C:\Sport.zh | C:\Sport.zh-Hant | Delphi resource DLL. |
<id>\<body>.<win> | C:\Sport.exe | C:\de\Sport.DE | C:\de\Sport.DEU | C:\ja\Sport.JA | C:\zh\Sport.CH | C:\zh-Hant\Sport.CHT | Legacy Delphi resource DLL. |
all\<file> | C:\Sport.exe | C:\all\Sport.exe | C:\all\Sport.exe | C:\all\Sport.exe | C:\all\Sport.exe | C:\all\Sport.exe | This pattern does not have a language item. This is why the output file is the same for all languages. Use a pattern like this only with multilingual output files. |
<net>\<body>.resources.dll | C:\Sport.exe | C:\de\Sport.resources.dll | C:\de-DE\Sport.resources.dll | C:\ja\Sport.resources.dll | C:\zh-Hans\Sport.resources.dll | C:\zh-Hant\Sport.resources.dll | .NET satellite assembly file. |