Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Internationalisation (I18N) » Help with internationalisation please
Help with internationalisation please [message #1470] Tue, 15 July 2008 10:29 Go to next message
bonzo_bcn is currently offline  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 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
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';


Re: Help with internationalisation please [message #1474 is a reply to message #1470] Tue, 15 July 2008 12:50 Go to previous messageGo to next message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
Ok, understood.
What are the entries that the framework puts under
// column details for subsystem
when exporting the subsystem used for?
Re: Help with internationalisation please [message #1475 is a reply to message #1474] Tue, 15 July 2008 13:02 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
Those are used when the column_id itself is used as the label text, such as in an OUTPUT4 pattern, or in error messages.

Re: Help with internationalisation please [message #1476 is a reply to message #1470] Tue, 15 July 2008 13:14 Go to previous messageGo to next message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
ok I see.

If I understood correctly 'sys.language_text.inc' and 'sys.language_array.inc' can only be in one language?

I mean, can I have a copy of each of this two files in the /text/lang/ folder so that each language has it's own values?
Re: Help with internationalisation please [message #1477 is a reply to message #1476] Tue, 15 July 2008 14:03 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
Yes, you will need a copy of 'sys_language_text.inc' and 'sys_language_array.inc' for each language you wish to support.

Re: Help with internationalisation please [message #1526 is a reply to message #1470] Tue, 12 August 2008 11:42 Go to previous messageGo to next message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
I created the files:

en/language_array.inc
en/language_text.inc
en/sys.language_array.inc
en/sys.language_text.inc

and modified the labels/messages.

Radicore is using the labels of the first two files, but it's ignoring the labels in the sys.* files, instead it's using the ones in the menu folder.
Am I missing something?
Re: Help with internationalisation please [message #1527 is a reply to message #1526] Tue, 12 August 2008 12:05 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
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.


Re: Help with internationalisation please [message #1528 is a reply to message #1470] Tue, 12 August 2008 12:12 Go to previous messageGo to next message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
Then what is the reason to have them in the text/en and text/fr folder in your sample application?

Do you plan to modify Radicore so the messages in the sys.* files can also be translated to support several languages?
Re: Help with internationalisation please [message #1530 is a reply to message #1528] Tue, 12 August 2008 12:33 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
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.


Re: Help with internationalisation please [message #1531 is a reply to message #1470] Tue, 12 August 2008 12:41 Go to previous messageGo to next message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
I'm really confused....

If I put the sys.* files in my myapp/text/es, will radicore use them when the user is logged into myapp application?

Re: Help with internationalisation please [message #1532 is a reply to message #1531] Tue, 12 August 2008 13:01 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
No. The 'sys.language_*.inc' files will only ever be read from the 'menu/text/<language>' directory. This is documented in http://www.tonymarston.net/php-mysql/internationalisation.ht ml#file.names.

Re: Help with internationalisation please [message #1533 is a reply to message #1470] Tue, 12 August 2008 13:07 Go to previous messageGo to next message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
I read that document and that's what I thought, but then why are they in the sub folders of the sample application?

Re: Help with internationalisation please [message #1534 is a reply to message #1470] Tue, 12 August 2008 13:08 Go to previous messageGo to next message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
So there are some messages that the user will get in english even though he has another language assigned?
Re: Help with internationalisation please [message #1535 is a reply to message #1533] Tue, 12 August 2008 13:16 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
bonzo_bcn wrote on Tue, 12 August 2008 18:07

I read that document and that's what I thought, but then why are they in the sub folders of the sample application?

They are not. They are entirely separate downloads and run independently of each other.


Re: Help with internationalisation please [message #1536 is a reply to message #1534] Tue, 12 August 2008 13:25 Go to previous message
AJM is currently offline  AJM
Messages: 2367
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.


Previous Topic: translating fieldnames in errormessages
Next Topic: Title not translated when accessing the system
Goto Forum:
  


Current Time: Thu Nov 21 21:38:38 EST 2024

Total time taken to generate the page: 0.01443 seconds