This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
Appendix B: XLIFF architecture
|
1 2 3 4 5 6 7 | < group resname = "[Clients]" > < group resname = "Form1" > < trans-unit resname = "SaveButton" > ... </ trans-unit > </ group > </ group > |
1 2 3 4 5 6 7 | < group resname = "[ProjectForm]" > < group resname = "Form1" > < trans-unit resname = "SaveButton" > ... </ trans-unit > </ group > </ group > |
Note: In order for the ObjectName syntax to work correctly, the "Title" property of the object must not be left blank in the Property list.
If you use different syntaxes in your database, the order of priority applied when searching a valid translation in the XLIFF files will be as follows:
1. “:15115,3” syntax
2. “:xliff:OKButton” syntax
3. “MyTitle” syntax
You can see the XLIFF reference or the title translated according to the current language in the form editor using, respectively, the Show Name and Show Resource commands of the Object menu. For more information, refer to Using references in static text.
To implement an XLIFF architecture for your localized application, you just need to build one or more valid XLIFF file(s) and copy them into the Resources folder of the database.
For more information about the Resources folder of the database, refer to Managing the Resources folder.
Here is the full pathname to use:
where:
4D will automatically load the XLIFF files in the folder corresponding to the current language of the database. To set the current language of the database, 4D carries out successive searches in the Resources folder of the database to find a language corresponding to (in the following order of priority):
The Get database localization command finds out what current language is specified for the database.
If a language variation is used and is not available in the XLIFF files, the next closest language will be used.
XLIFF files can be named freely; they just need to have the extension “.xlf.”. You can place several XLIFF files in the same language folder; they will be loaded in the alphabetical order of the file names.
The name of the “.lproj” folder must respect one of the standards described below. 4D will look for a valid folder name based on each of these standards, in the following specific order:
A summary table of the language codes supported by 4D is provided in .
If several language definitions are found, 4D will always look for the most precise translations. For example, if the current OS language setting is “French Canadian,” 4D will first look for “fr-ca” translations and then, if not found, “fr” translations.
Note: The same principle applies within XLIFF files for the “target-language” tag. You must be sure to carefully set this attribute within the XLIFF files since a file located in the “fr-ca.lproj” folder that has a “target-language=fr” tag will be considered as a translation into “fr” and not “fr-ca.”
The XLIFF files are reloaded “dynamically” while you localize your application, so that you can see if the localized words or sentences fit into the object frames (buttons, group boxes, etc.). This reload occurs as 4D comes back to the front whenever the modification date or time has been changed since the last load.The current form will be reloaded simultaneously.
The following table lists the language codes supported by 4D for managing XLIFF files.
Languages | ISO639-1 | “Legacy” | ISO3166 / ISO15924 |
AFRIKAANS | af | afrikaans | |
ALBANIAN | sq | albanian | |
ARABIC_SAUDI_ARABIA | ar | arabic | sa |
ARABIC_IRAQ | ar | arabic | iq |
ARABIC_EGYPT | ar | arabic | eg |
ARABIC_LIBYA | ar | arabic | ly |
ARABIC_ALGERIA | ar | arabic | dz |
ARABIC_MOROCCO | ar | arabic | ma |
ARABIC_TUNISIA | ar | arabic | tn |
ARABIC_OMAN | ar | arabic | om |
ARABIC_YEMEN | ar | arabic | ye |
ARABIC_SYRIA | ar | arabic | sy |
ARABIC_JORDAN | ar | arabic | jo |
ARABIC_LEBANON | ar | arabic | lb |
ARABIC_KUWAIT | ar | arabic | kw |
ARABIC_UAE | ar | arabic | ae |
ARABIC_BAHRAIN | ar | arabic | bh |
ARABIC_QATAR | ar | arabic | qa |
BASQUE | eu | basque | |
BELARUSIAN | be | belarusian | |
BULGARIAN | bg | bulgarian | |
CATALAN | ca | catalan | |
CHINESE_TRADITIONAL | zh | chinese | hant |
CHINESE_SIMPLIFIED | zh | chinese | hans |
CHINESE_HONGKONG | zh | chinese | hk |
CHINESE_SINGAPORE | zh | chinese | sg |
CROATIAN | hr | croatian | |
CZECH | cs | czech | |
DANISH | da | danish | |
DUTCH | nl | dutch | |
DUTCH_BELGIAN | nl | dutch | be |
ENGLISH_US | en | english | |
ENGLISH_UK | en | english | gb |
ENGLISH_AUSTRALIA | en | english | au |
ENGLISH_CANADA | en | english | ca |
ENGLISH_NEWZEALAND | en | english | nz |
ENGLISH_EIRE | en | english | ie |
ENGLISH_SOUTH_AFRICA | en | english | za |
ENGLISH_JAMAICA | en | english | jm |
ENGLISH_BELIZE | en | english | bz |
ENGLISH_TRINIDAD | en | english | tt |
ESTONIAN | et | estonian | |
FAEROESE | fo | faorese | |
FARSI | fa | persian | |
FINNISH | fi | finnish | |
FRENCH | fr | french | |
FRENCH_BELGIAN | fr | french | be |
FRENCH_CANADIAN | fr | french | ca |
FRENCH_SWISS | fr | french | ch |
FRENCH_LUXEMBOURG | fr | french | lu |
GERMAN | de | german | |
GERMAN_SWISS | de | german | ch |
GERMAN_AUSTRIAN | de | german | at |
GERMAN_LUXEMBOURG | de | german | lu |
GERMAN_LIECHTENSTEIN | de | german | li |
GREEK | el | greek | |
HEBREW | he | hebrew | |
HUNGARIAN | hu | hungarian | |
ICELANDIC | is | iceland | |
INDONESIAN | id | indonesian | |
ITALIAN | it | italian | |
ITALIAN_SWISS | it | italian | ch |
JAPANESE | ja | japanese | |
KOREAN_WANSUNG | ko | korean | |
KOREAN_JOHAB | ko | korean | |
LATVIAN | lv | latvian | |
LITHUANIAN | lt | lithuanian | |
NORWEGIAN | no | norwegian | |
NORWEGIAN_NYNORSK | nn | nynorsk | no |
POLISH | pl | polish | |
PORTUGUESE | pt | portuguese | |
PORTUGUESE_BRAZILIAN | pt | portuguese | br |
ROMANIAN | ro | romanian | |
RUSSIAN | ru | russian | |
SERBIAN_LATIN | sr | serbian | latn |
SERBIAN_CYRILLIC | sr | serbian | cyrl |
SLOVAK | sk | slovak | |
SLOVENIAN | sl | slovenian | |
SPANISH_CASTILLAN | es | spanish | |
SPANISH_MEXICAN | es | spanish | mx |
SPANISH_MODERN | es | spanish | |
SPANISH_GUATEMALA | es | spanish | gt |
SPANISH_COSTA_RICA | es | spanish | cr |
SPANISH_PANAMA | es | spanish | pa |
SPANISH_DOMINICAN_REPUBLIC | es | spanish | do |
SPANISH_VENEZUELA | es | spanish | ve |
SPANISH_COLOMBIA | es | spanish | co |
SPANISH_PERU | es | spanish | pe |
SPANISH_ARGENTINA | es | spanish | ar |
SPANISH_ECUADOR | es | spanish | ec |
SPANISH_CHILE | es | spanish | cl |
SPANISH_URUGUAY | es | spanish | uy |
SPANISH_PARAGUAY | es | spanish | py |
SPANISH_BOLIVIA | es | spanish | bo |
SPANISH_EL_SALVADOR | es | spanish | sv |
SPANISH_HONDURAS | es | spanish | hn |
SPANISH_NICARAGUA | es | spanish | ni |
SPANISH_PUERTO_RICO | es | spanish | pr |
SWEDISH | sv | swedish | |
SWEDISH_FINLAND | sv | swedish | fi |
THAI | th | thai | |
TURKISH | tr | turkish | |
UKRAINIAN | uk | ukrainian | |
VIETNAMESE | vi | vietnamese |
Product: 4D
Theme: Appendixes
4D Design Reference ( 4D v20 R7)