Help with internationalisation please [message #1470] |
Tue, 15 July 2008 10:29 |
bonzo_bcn
Messages: 152 Registered: June 2008
|
Senior Member |
|
|
I was trying to translate my application to another language but I don't seem to do it right:
I exported the subsystem. This created a file called 'subsystem'.menu_export.txt in the text folder.
I copied the content to text/en/language_text.inc translating the titles to the right.
So now when I open the subsystem I should see all the translated labels in all the screens, right?
EDIT:I found in the tutorial that all the screen files have to be copied and translated.
So if I have to translate all the screen files, where are the 'column details for subsystem'defined in the language_text.inc file used?
[Updated on: Tue, 15 July 2008 12:03] Report message to a moderator
|
|
|
Re: Help with internationalisation please [message #1473 is a reply to message #1470] |
Tue, 15 July 2008 12:39 |
AJM
Messages: 2363 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
(1) You do not *have* to copy all the screen structure files in order to provide alternative text for screen labels.
(2) If you put the file 'language_text.inc' in the 'en' subdirectory then that is the English translation. What languages are you translating from/to?
(3) There is a difference between the column_id and the label text. For example, in my Example application (included in the Radicore download) is a screen 'person.detail.screen.inc' which is used in the 'Enquire Person' task. This uses the label 'First Name' for the column 'first_name'. To translate this into another language your 'language_text.inc' file must contain an entry such as
$array['First Name'] = 'Foo Bar';
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
|
|
|
Re: Help with internationalisation please [message #1527 is a reply to message #1526] |
Tue, 12 August 2008 12:05 |
AJM
Messages: 2363 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
If you wish to create translated files then you should NOT put them in the 'en' subdirectory as that is reserved for the English translations. You need to create a separate subdirectory for each language, such as 'fr' for French, 'es' for Spanish or 'de' for German. This allows several translations to be available at the same time. At run time it is the user's language, as provided in $_SERVER["HTTP_ACCEPT_LANGUAGE"], which identifies which subdirectory to use.
The 'sys.language_*.inc' files must ONLY exist in the 'menu' directory. These are system-wide messages whereas everything else is reserved for a particular subsystem.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Help with internationalisation please [message #1530 is a reply to message #1528] |
Tue, 12 August 2008 12:33 |
AJM
Messages: 2363 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Do not confuse the small sample application with the larger Radicore application. The sample application has everything in a single directory whereas Radicore has a series of different subsystems each in its own subdirectory.
If you look inside the Radicore structure you will clearly see that the files 'sys.language_text.inc' and 'sys.language_array.inc' exist ONLY in the 'menu' subsystem. It is a waste of time putting them anywhere else as they will be ignored.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
|
|
|
Re: Help with internationalisation please [message #1536 is a reply to message #1534] |
Tue, 12 August 2008 13:25 |
AJM
Messages: 2363 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
bonzo_bcn wrote on Tue, 12 August 2008 18:08 | So there are some messages that the user will get in english even though he has another language assigned?
|
If you read the documentation you should see that text can be made available in any number of different languages, with each set of translations maintained in a totally separate directory whose name is related to the language code. So if one user requires the French language all requests for text will first look in the 'text/fr' subdirectories. This means that several users can each access the same application at the same time but get text in the language which is appropriate to them.
The only time that text will be served up in English instead of the user's language is when a 'text/<language>' directory does not exist in the user's language. This makes English the default language when translations do not exist.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|