[FX.php List] Approach for multiple language project

Gjermund Gusland Thorsen ggt667 at gmail.com
Sat Nov 21 06:15:52 MST 2009


Doing the same thing inside FileMaker the first thing to do is naming
the fields that you would like to label.

I just name them the same as the fields, but with an l up front like lFieldname.

This can also be used on the web stripping off the l and making the
remains compare to the fieldname.

ggt


2009/11/21 Steve Winter <steve at bluecrocodile.co.nz>:
> Hi Jonathan et. al.
> I'm 100% with ggt on this...!
> When I tackled a multi-language shopping cart I started out with an approach
> similar to what Frank (a.k.a Someone) had, using a PHP file for each
> language, then a 'switch' command to load the appropriate language file into
> a session variable for each user...
> Even before we got out of UAT it was driving me nuts with (at that time)
> only three languages (other than English) none of which I understood because
> I had to keep making 'little changes' to the text... the original
> translations had all been done by the people responsible for the various
> language carts, but they had been done 'out of context' so once they saw
> them actually on the site, they need to change this, that and 21 thousand
> other little things...
> I knew that there were other languages coming, so late one night, in a fit
> of despair when I received yet another batch of modifications for the French
> cart, I converted the whole lot to an FMP database, created user accounts in
> it, and sent them to each of the office responsible for the translation...
> problem solved...!!
> When we add a new language to the cart, all I have to do is create a new
> record, and a new account, and send those details to the new office... they
> do all the translation, of all the onscreen text and messages, and it keeps
> it really simple for me...!
> Clearly your milage will vary, but having the on-screen text in a place
> where the 'owners' can modify it has saved me endless hours of 'tweaking'...
> As to special characters, FM handles that just fine, just make sure that
> your PHP pages are saved in UTF-8 and that you have the UTF-8 meta
> declaration in the HTML for th page, and all will be well...
> YMMV...
> Cheers
> Steve
>
>
> On 21 Nov 2009, at 04:06, 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
>
> Steve Winter
> steve at bluecrocodile.co.nz
> m: +44 77 7852 4776
> 3 Calshot Court, Channel Way
> Ocean Village, Southampton SO14 3GR
>
> _______________________________________________
> 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