Adding spanish Language

ajperezcrespo wrote on Friday, January 27, 2006:

How do I add spanish?
on the info page it says:
‘If you click other label than English, you get a set of all constants, the English definition at the side, and an input box to enter/modify the definition in the selected language.’
If I set LANGUAGE in globals to 3
But I never get this, it just loads.

But if I set it to one I get
‘Warning: Invalid argument supplied for foreach() in /var/www/openemr/interface/language/lang_definition.php on line 9
Warning: Invalid argument supplied for foreach() in /var/www/openemr/interface/language/lang_definition.php on line 25’

So what exactly do I do?

Thanks
Alfonso

andres_paglayan wrote on Monday, February 06, 2006:

After many requests we did provide the translation framwork tool.

This doesn’t mean we have preloaded the system with the translation. We expect this to happen from the user community.

To Add a language.

First make sure you do have the language module and the language tables loaded. Wich are only available from CVS.
They are in sql/2_8_0-to-2_8_1_upgrade.sql

Go to administration -> language
click in add constant.

Constants are all the _ENGLISH_ phrases -one or more word, with or without punctuation marks- which are used along the software, if you look into the scripts, the constants are all those phrases inside the xl() function.
so if you see in the code something like i.e. xl(‘Hello’) makes Hello a constant.
And something like xl(‘Patient Notes:’) makes Patient Notes: a constant.

Once you have identified the constants enter them using the ‘add constant’ option in the language tool menu,

After you added all constants, click on edit definitions: Spanish

you’ll see the list of constants plus an empty definition, load the empty definition field with the Spanish translation an save,

then you can set language to 3 in globals

after that, if you’ll send us the dump from the lang tables, we will include it in the repository so Spanish translation will be ‘built in’

ajperezcrespo wrote on Monday, February 06, 2006:

Thanks Andres
  Now it makes sense to me and so I have begun.  But as I’m going through the files it seems like not all have the xl() function in them.  If so then, how can I get those done?

BTW Andres
I will try and keep my spanish translation as generic as possible or when possible make reference to La Real Academia.

Mil Gracias
Alfonso

andres_paglayan wrote on Tuesday, February 07, 2006:

The steps should be:

1./ read this post carefully and ask any question you might have before starting. it explains the use of the xl() function.
http://sourceforge.net/forum/message.php?msg_id=3430194

1.a/ get the most recent copy from CVS before starting.

2./ make changes in one file at a time and finish the file.

3./ test the file (so every translated phrase under xl() shows properly when using the software.

4./ generate a diff file *

5./ send the diff file by email to me, I’ll commit those changes.

6./ refresh from CVS the next file you’ll be woking with. Go back to #2.

* if you don’t know how to generate a diff file in  'nix read

$>man diff

most cases breaks down to:
diff file-new file-old > file.diff

On windows you can get some free soft to get it done, such as http://winmerge.org/

ajperezcrespo wrote on Tuesday, February 07, 2006:

Yikes!
   OK I’ll take a crack at it.  I gave up coding 19 years ago.
Thanks
Alfonso

ajperezcrespo wrote on Tuesday, February 07, 2006:

Andres
What’s your email?

Alfonso

andres_paglayan wrote on Tuesday, February 07, 2006:

for private questions you can always send email using the one at sourceforge, wich forwards to the emails registered at SF, other than that my private is andres at paglayan dot com

nzimas wrote on Friday, March 17, 2006:

I have followed the instructions specified (at least i think i did).

from a stable 2.8.0 release, first i have upgraded the db to version 2.8.1 (which outputed a query error, but executed most of the instructions), then i have upgraded it to version 2.8.2.

Afterwards i have logged in oemr, browsed to administration but there was no "language" link at all.

do i have to install the WHOLE cvs version to have access to this dev functionality?

Thanks for helping.

Nuno.

andres_paglayan wrote on Friday, March 17, 2006:

…hmmm,
you’ll need to adjust gacl access since language is a new acceess object