File search and language-fallback-mechanism
Searching for files in the language dependent subdirectories and language-fallback-mechanism, just in case that a file is not found in the active language.
When searching for a file in a multilingual project in the language-dependent subdirectories, the search starts in the directory of the active language (in the project directory). If the file is not found there, the program continues to search for the file in the active language’s WinCC OA directory.
In case the file is not found in the active language, the fallback-mechanism which appears in the table will come into force.
For each language, the program first searches in the project directory, then in the WinCC OA directory.
Language-fallback-mechanism
When a panel file does not contain a text for a project language, the text can be translated into this language using the Translator. The source text for the translation is defined by the config entry [general] paramLang, or the first language defined in the project. In case there is no translation found for the project language, the source text will be displayed.
WinCC OA provides translations for English, German and Russian. To avoid text being translated to one of the target languages, the config entry [general] paramLang can be set to this language. If the config entry is set, the specified language will be used a translation source language and therefore won't be replaced by translation.
The described language fallback mechanism will be also applied when the panel file contains text in a different encoding (ISO) compared to the project languages (UTF-8).
As of the version 3.20, it is no longer possible to create ISO-encoded languages in projects, thus all new projects must be created using UTF-8 project languages.
WinCC OA always uses this fallback-mechanism in multilingual projects when searching for files in language-dependant subdirectories. Example are when searching for the catalog entries, for the translated texts in panels using either Commandline Translation Tools or the WinCC OA Translator, or for project import/export by using the ASCII-Manager.
Search order | Example |
---|---|
'locale'-String of the aktive language: <language>_<territory>.<coding> | fr_CA.utf8 |
'locale'-String with: <same language>_<same territory>.<different coding> | fr_CA.iso88591 |
'locale'-String with: <same language>_<different territory>.<same coding> | fr_FR.utf8 |
'locale'-String with: <same language>_<different territory>.<different coding> | fr_FR.iso88591 |
<Englisch>_<US>.<same coding> | en_US.utf8 |
<Englisch>_<US>.<different coding> | en_US.iso88591 |
<Deutsch>_<AT>.<ISO-coding> | de_AT.iso88591 |
Example for file search
The following example illustrates how within a project
d:/tmp/lang with the WinCC OA
installation in d:/WinCC_OA
searches the file
_errors.cat
in a multilingual project in the active language
fr_CA.utf8:
Language string | Example | Path / File |
---|---|---|
<language>_<territory>.<coding> | fr_CA.utf8 | d:/tmp/lang/msg/fr_CA.utf8/_errors.cat |
d:/WinCC_OA/msg/fr_CA.utf8/_errors.cat | ||
<same language>_<same territory>.<different coding> | fr_CA.iso88591 | d:/tmp/lang/msg/fr_CA.iso88591/_errors.cat |
d:/WinCC_OA/msg/fr_CA.iso88591/_errors.cat | ||
<same language>_<different territory>.<same coding> | fr_FR.utf8 | d:/tmp/lang/msg/fr_FR.utf8/_errors.cat |
d:/WinCC_OA/msg/fr_FR.utf8/_errors.cat | ||
<same language>_<different territory>.<different coding> | fr_FR.iso88591 | d:/tmp/lang/msg/fr_FR.iso88591/_errors.cat |
d:/WinCC_OA/msg/fr_FR.iso88591/_errors.cat | ||
<Englisch>_<US>.<same coding> | en_US.utf8 | d:/tmp/lang/msg/en_US.utf8/_errors.cat |
d:/WinCC_OA/msg/en_US.utf8/_errors.cat | ||
<Englisch>_<US>.<different coding> | en_US.iso88591 | d:/tmp/lang/msg/en_US.iso88591/_errors.cat |
d:/WinCC_OA/msg/en_US.iso88591/_errors.cat | ||
<German>_<AT>.<ISO-coding> | de_AT.iso88591 | d:/tmp/lang/msg/de_AT.iso88591/_errors.cat |
d:/WinCC_OA/msg/de_AT.iso88591/_errors.cat |