Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:rc_localisation_traduction [2016/11/17 23:07] – Domperss | en:rc_localisation_traduction [2021/12/03 18:19] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 65: | Line 65: | ||
| identifier [Other text value]</ | identifier [Other text value]</ | ||
| - | If you want to specify new rows or tabs in a string-value, | + | If you want to specify new rows or tabs in a string-value, |
| < | < | ||
| - | identifier2 [New line \ nText on a new line] | + | identifier2 [New line \nText on a new line] |
| - | identifier3 [Backslash : \\] | + | identifier3 [Backslash: \\] |
| - | identifier4 [A closing hook : \] ]</ | + | identifier4 [A closing hook: \] ]</ |
| For easier use and maintaining, | For easier use and maintaining, | ||
| - | This is done by using a pre-processor command in the C-programing language: "# | + | This is done by using a pre-processor command in the C-programing language: "# |
| #include " | #include " | ||
| - | You can have any number of " | + | You can have any number of " |
| The " | The " | ||
| Line 152: | Line 152: | ||
| propertyName : identifier | propertyName : identifier | ||
| - | operator : ‘=’ | + | operator: ‘=’ |
| | ‘!=’ | | ‘!=’ | ||
| | ‘<’ | | ‘<’ | ||
| Line 159: | Line 159: | ||
| | ‘<=’ | | ‘<=’ | ||
| - | reference : identifier | + | reference: identifier |
| - | textValue : ‘[‘ .* ‘]’</ | + | textValue: ‘[‘ .* ‘]’</ |
| As in format 1, you can insert "C style" comments in the text, identifier with enclosure marks, and use the include command. | As in format 1, you can insert "C style" comments in the text, identifier with enclosure marks, and use the include command. | ||
| Line 182: | Line 182: | ||
| Example: You have a string with the following replacements(in English): | Example: You have a string with the following replacements(in English): | ||
| - | '' | + | '' |
| And the file will contain the following names: | And the file will contain the following names: | ||
| Line 192: | Line 192: | ||
| If the item is ' | If the item is ' | ||
| - | '' | + | ''" |
| But for 'l’ échelle', | But for 'l’ échelle', | ||
| - | '' | + | ''" |
| To remove this extra space, you can add a ' | To remove this extra space, you can add a ' | ||
| Line 220: | Line 220: | ||
| The server-side translation is a bit more complicated. | The server-side translation is a bit more complicated. | ||
| - | We will see how the server-side translations is done in four steps (We will start with the simplest to the most complicated problems, Yay!). | + | We will see how the server-side translations is done in four steps(We will start with the simplest to the most complicated problems, Yay!). |
| === Step 1: A single string === | === Step 1: A single string === | ||
| To "pull this of", you only need the sentence file. | To "pull this of", you only need the sentence file. | ||
| - | Let's say we want a string that says "hello world!", | + | Let's say we want a string that says "hello world!", |
| - | Let's create a phrase entry in '' | + | Let's create a phrase entry in '' |
| - | < | + | < |
| { | { | ||
| [Hello world!] | [Hello world!] | ||
| Line 236: | Line 236: | ||
| Of course, you will also have to provide the same sentence in all supported languages, for example in file phrase_en.txt: | Of course, you will also have to provide the same sentence in all supported languages, for example in file phrase_en.txt: | ||
| - | < | + | < |
| { | { | ||
| [Bonjour le monde!] | [Bonjour le monde!] | ||
| Line 243: | Line 243: | ||
| Notice that only the value of the text has changed. The sentence identifier ** MUST ** be the same in all translation files. | Notice that only the value of the text has changed. The sentence identifier ** MUST ** be the same in all translation files. | ||
| - | === Step 2: Workaround for " | + | === Step 2: Workaround for " |
| In the 4th step, we will see that the file-sentences can become very complex. Therefore is these kind of files not very suitable if you(for example) want to give it to a professional translator without the proficiency in complex file grammatics. Even worse, the complexity of the file may hide the translation work itself. | In the 4th step, we will see that the file-sentences can become very complex. Therefore is these kind of files not very suitable if you(for example) want to give it to a professional translator without the proficiency in complex file grammatics. Even worse, the complexity of the file may hide the translation work itself. | ||
| Line 251: | Line 251: | ||
| Let's go back to the previous, above example.. with a " | Let's go back to the previous, above example.. with a " | ||
| - | In '' | + | In '' |
| < | < | ||
| { | { | ||
| Line 257: | Line 257: | ||
| }</ | }</ | ||
| - | As you can see, we only need to put an identifier in the sentence block. This means that the phrase refers to a string identified as '' | + | As you can see, we only need to put an identifier in the sentence block. This means that the phrase refers to a string identified as '' |
| - | Maintenant, nous pouvons créer la valeur textuelle dans '' | + | Now we can create the text value in '' |
| Hello [Hello world!] | Hello [Hello world!] | ||
| Line 266: | Line 266: | ||
| <WRAP center round tip 80%> | <WRAP center round tip 80%> | ||
| - | To facilitate the translation work, it is possible to specify the string identifier ** AND ** the value identifier. This can be useful for automatically building a translation file from the original file. | + | To facilitate the translation work, it is possible to specify the string identifier **AND** the value identifier. This can be useful for automatically building a translation file from the original file. |
| Exemple : | Exemple : | ||
| Line 273: | Line 273: | ||
| Hello [Bonjour le monde!] | Hello [Bonjour le monde!] | ||
| }</ | }</ | ||
| + | |||
| + | </ | ||
| In a case like this, the translation system always looks first in the clause file, and then falls back on the text value in the sentence file ONLY if it does NOT find a string in the clause file. | In a case like this, the translation system always looks first in the clause file, and then falls back on the text value in the sentence file ONLY if it does NOT find a string in the clause file. | ||
| Line 283: | Line 285: | ||
| Each sentence can receive a list of parameters. | Each sentence can receive a list of parameters. | ||
| - | These parameters can be of different types : | + | These parameters can be of different types: |
| * item, // | * item, // | ||
| * place, // | * place, // | ||
| Line 313: | Line 315: | ||
| Each parameter receives a name (or id) from its declaration. We call it paramName. | Each parameter receives a name (or id) from its declaration. We call it paramName. | ||
| - | Each type of parameter ** MAY ** be associated with a ' | + | Each type of parameter **MAY** be associated with a ' |
| The first column is very important because it associates a data line with a particular value of the parameter. | The first column is very important because it associates a data line with a particular value of the parameter. | ||
| Line 322: | Line 324: | ||
| <WRAP center round important 60%> | <WRAP center round important 60%> | ||
| - | NB: The first column ** MUST ** always be the association field and you will need to have a '' | + | NB: The first column **MUST** always be the association field and you will need to have a '' |
| </ | </ | ||
| Line 547: | Line 549: | ||
| <WRAP center round info 60%> | <WRAP center round info 60%> | ||
| - | Test to perform cf HexChatlog kerv30/ | + | Test to perform cf HexChatlog kerv30/ |
| </ | </ | ||





