[FX.php List] Approach for multiple language project

Dale Bengston dbengston at tds.net
Sat Nov 21 08:12:57 MST 2009


Agreed. You could even have PHP write your JS validation script according to the proper language, or at least write out variables containing the translated text that your validation script uses for display. I would strongly recommend storing all the translated variations in tables.

Dale

On Nov 20, 2009, at 10:06 PM, Gjermund Gusland Thorsen wrote:

> Mainly due to easy maintenance, and that the client can edit the
> values themselves.
> 
> ggt
> 
> 2009/11/21 Jonathan Schwartz <jschwartz at exit445.com>:
>> ggt... Thanks for the code.  Tell me why you think that storing the variable
>> data in FileMaker is better than in text files.
>> 
>> J
>> 
>> At 10:44 PM +0100 11/20/09, Gjermund Gusland Thorsen wrote:
>>> 
>>> Untested, but I think this would do the job:
>>> 
>>> Do not forget to have session_start(); at the top of every file.
>>> 
>>> http://pastebin.com/f528f1f4
>>> 
>>> ggt
>>> 
>>> 2009/11/20 Gjermund Gusland Thorsen <ggt667 at gmail.com>:
>>>> 
>>>>  Please use FileMaker for those values,
>>>>  it will most likely save you alot of trouble.
>>>> 
>>>>  ggt
>>>> 
>>>>  2009/11/20 Jonathan Schwartz <jschwartz at exit445.com>:
>>>>> 
>>>>>  Thanks for the sample code. Seeing all the "non-standard" characters
>>>>> makes
>>>>>  me think of another question...whether FileMaker will handle these as
>>>>> well
>>>>>  as in a text editor, if a text file method is used.
>>>>> 
>>>>>  Jonathan
>>>>> 
>>>>>  At 2:58 PM -0500 11/20/09, Someone wrote:
>>>>>> 
>>>>>>  Hi Jonathan,
>>>>>>  I did a project with 3 languages.
>>>>>>  The labels of each form were variables.
>>>>>>  Lucky the labels didn't change.
>>>>>>  If they'd changed often then maybe a database would have be needed.
>>>>>> 
>>>>>> 
>>>>>>  eg.
>>>>>>  if ($lang == 'en'){
>>>>>>        $l_header = "Please complete the following billing
>>>>>> information:";
>>>>>>        $l_name = "Full Name";
>>>>>>        $l_appears = "(as it appears on credit card)";
>>>>>>        $l_card = "Credit Card Number";
>>>>>>        $l_month = "Expiry Month";
>>>>>>        $l_year = "Expiry Year";
>>>>>>        $l_email = "Email address";
>>>>>>        $l_regret = "We regret that we can only accept VISA and
>>>>>> MasterCard
>>>>>>  payments at this time.";
>>>>>> 
>>>>>>  }elseif ($lang == 'fr'){
>>>>>>        $l_header = "S'il vous plait remplissez les champs suivants avec
>>>>>>  vos donnÈs:";
>>>>>>        $l_name = "Nom";
>>>>>>        $l_appears = "(du titulaire de la carte de credit)";
>>>>>>        $l_card = "NumÈro de la carte de credit";
>>>>>>        $l_month = "Mois d'ÈchÈance";
>>>>>>        $l_year = "AnnÈe d'ÈchÈance";
>>>>>>        $l_email = "Adresse Èlectronique";
>>>>>>        $l_regret = " Paiement par carte VISA ou MasterCard seulement";
>>>>>> 
>>>>>>  }elseif ($lang == 'es'){
>>>>>>        $l_header = "Por favor complete la siguiente informaciÛn de
>>>>>> pago:";
>>>>>>        $l_name = "Nombre completo";
>>>>>>        $l_appears = "(tal como aparece en su tarjeta de crÈdito)";
>>>>>>        $l_card = "N mero de tarjeta de crÈdito";
>>>>>>        $l_month = "Mes de vencimiento";
>>>>>>        $l_year = "AÒo de vencimiento";
>>>>>>        $l_email = "DirecciÛn electrÛnica";
>>>>>>        $l_regret = "Pago por tarjeta VISA o MasterCard solamente.";
>>>>>> 
>>>>>>  }
>>>>>> 
>>>>>>  On Nov 20, 2009, at 2:44 PM, Jonathan Schwartz wrote:
>>>>>> 
>>>>>>>  Hi Folks,
>>>>>>> 
>>>>>>>  I'm contemplating how to best approach a new project. The core of the
>>>>>>>  project is a multi-page online application form that is needed in 6
>>>>>>>  different languages.
>>>>>>> 
>>>>>>>  Obvioulsy, the process starts by defining each block of text in the
>>>>>>>  form...including error messaging... and assigning a unique variable.
>>>>>>> The
>>>>>>>  variable gets populated from 6 different "buckets" of values of each
>>>>>>>  language after a master language variable is set.
>>>>>>> 
>>>>>>>  The question is how to store the text data.  I guess the choices are
>>>>>>>  either in individual languages php files, one for each language, and
>>>>>>>  including the appropriate files.  The other choice is storing the
>>>>>>> text in a
>>>>>>>  FileMaker database.  The first option would be faster, but "more
>>>>>>> technical"
>>>>>>>  to edit. The latter would require more processing power but be easier
>>>>>>> to
>>>>>>>  edit and manage.
>>>>>>> 
>>>>>>>  A further complication is handling javascript forms validation in the
>>>>>>>  various languages as well.
>>>>>>> 
>>>>>>>  Anyone been down this road before?
>>>>>>> 
>>>>>>>  Thanks
>>>>>>> 
>>>>>>>  Jonathan
>>>>>>>  --
>>>>>>>  Jonathan Schwartz
>>>>>>>  Exit 445 Group
>>>>>>>  jonathan at exit445.com
>>>>>>>  http://www.exit445.com
>>>>>>>  415-370-5011
>>>>>>>  _______________________________________________
>>>>>>>  FX.php_List mailing list
>>>>>>>  FX.php_List at mail.iviking.org
>>>>>>>  http://www.iviking.org/mailman/listinfo/fx.php_list
>>> 
>>>  >>>
>>>>>> 
>>>>>>  _______________________________________________
>>>>>>  FX.php_List mailing list
>>>>>>  FX.php_List at mail.iviking.org
>>>>>>  http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>> 
>>>>> 
>>>>>  --
>>>>>  Jonathan Schwartz
>>>>>  Exit 445 Group
>>>>>  jonathan at exit445.com
>>>>>  http://www.exit445.com
>>>>>  415-370-5011
>>>>>  _______________________________________________
>>>>>  FX.php_List mailing list
>>>>>  FX.php_List at mail.iviking.org
>>>>>  http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>> 
>>>> 
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>> 
>> 
>> --
>> Jonathan Schwartz
>> Exit 445 Group
>> jonathan at exit445.com
>> http://www.exit445.com
>> 415-370-5011
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list