Forum

Translatable name. ...
 
Notifications
Retirer tout

Translatable name. How to add new ?

4 Posts
2 Utilisateurs
0 Reactions
8,488 Vu
(@babynus)
Posts: 14952
Membre Admin
Début du sujet
 
[#157]

Some items have a translatable name.
This means that when you have such an item, what is displayed is not directly its name, but a translation of its name.
These items are easily identified : they have a property $_isNameTranslatable = true;
Most of these items are internal lists, not updatable through the tool.
But two of them can be modified : "profile" and "access mode".
They are easily identified, because under the name field appears the translated name (display only).
This means you can add one new item, but then how do you set its name ?

Here is an example on how to add a new profile :
Add the new profile, and set its name to a significant value, without spaces or special characters, and idealy starting with "profile" (to be easily identified in the translation table). For instance, we will name it "profileNewValue".
Enter all the other values as desired and save.
After saving, you can see displayed value is "[profileNewValue]", meaning this value is not found in the translation table.
You must then add a new line in the lang.xls file. First download it from the "download" menu.
Open in in Excel, and allow macros.
Then, you must add a new line in lang.xls, with string="profileNewValue" (example) and default, en, fr and de columns with the caption you want to display.
Then, "save as" (to position the default directoriy in Excel, don't use direct "save") and click on "Generate". This will generate a lang.js file in the current directory and in the en, fr and de sub-directories.
Then you may copy these files to replace existing ones in the /tool/i18n/nls directory on your server.
Just display the profile again : the name is now translated.

NB: don't forget to save your lang.xls file and identify your changes (for instance using vers. column) because you will have to re-apply them after each new version deployment.


 
Posté : 8 Août PM 20:088
(@octobb)
Posts: 5
Active Member
 

Hy Babynus,

Please, can you explain me in more detail where I must create the profile (in wich php file [in Parameter>Access rights > Profiles ???] or only a new row in Excel [where I must place it?]) , and why the lang combobox in user parameters (in ProjectOr php page) don'd display my new language? Can you explain in more detail every step?
P.S. I want to make the Romanian translation of ProjectOr and after to send that translation to you, but I'm very confused about steps.
(Sorry if i post in bad place...)
Thank you very much!


 
Posté : 10 Déc PM 16:1212
(@babynus)
Posts: 14952
Membre Admin
Début du sujet
 

Hi,
To add new translation :
- download the lang.xls file in the download section
- copy it in /tool/i18n/nls
- open it with MS-Excel
- use one existing column, except 'default' and replace text of this column with your tranlation.
don't change the header of the column (en, fr, de, es or pt) : you will replace this language with your own
- use "save as" and save with the current name (no change), just to position the defaut directory
- click on the "generate" button : this should update all the lang.js file in current and sub-directories

If your Project'Or RIA instance is remote, not on Windows, just do the same locally and copy the generated lang.xls files to your server.
Then you can test your translation locally.

When done, send me the xls file, I will include the new language in the next version.

nb : this is explained is the user manual : http://projectorria.toolware.fr/manual/manual.php?page=26&tag=translat

Regards.


 
Posté : 10 Déc PM 18:1212
(@babynus)
Posts: 14952
Membre Admin
Début du sujet
 

About translatable name, complete description can be found in the user manual :
http://projectorria.toolware.fr/manual/manual.php?page=125&tag=translatable


 
Posté : 10 Déc PM 19:1212
Share:
Retour en haut