[FX.php List] Approach for multiple language project
Someone
someone at gagayaya.com
Fri Nov 20 12:58:23 MST 2009
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 =3D=3D 'en'){
$l_header =3D "Please complete the following billing =
information:";
$l_name =3D "Full Name";
$l_appears =3D "(as it appears on credit card)";=09
$l_card =3D "Credit Card Number";
$l_month =3D "Expiry Month";
$l_year =3D "Expiry Year";
$l_email =3D "Email address";
$l_regret =3D "We regret that we can only accept VISA and =
MasterCard =20
payments at this time.";
}elseif ($lang =3D=3D 'fr'){
$l_header =3D "S'il vous plait remplissez les champs suivants =
avec vos =20
donn=E9s:";
$l_name =3D "Nom";
$l_appears =3D "(du titulaire de la carte de credit)";=09
$l_card =3D "Num=E9ro de la carte de credit";
$l_month =3D "Mois d'=E9ch=E9ance";
$l_year =3D "Ann=E9e d'=E9ch=E9ance";
$l_email =3D "Adresse =E9lectronique";
$l_regret =3D " Paiement par carte VISA ou MasterCard =
seulement";
}elseif ($lang =3D=3D 'es'){
$l_header =3D "Por favor complete la siguiente informaci=F3n de =
pago:";
$l_name =3D "Nombre completo";
$l_appears =3D "(tal como aparece en su tarjeta de cr=E9dito)";=09=
$l_card =3D "N=FAmero de tarjeta de cr=E9dito";
$l_month =3D "Mes de vencimiento";
$l_year =3D "A=F1o de vencimiento";
$l_email =3D "Direcci=F3n electr=F3nica";
$l_regret =3D "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 =20
> the project is a multi-page online application form that is needed =20
> in 6 different languages.
>
> Obvioulsy, the process starts by defining each block of text in the =20=
> form...including error messaging... and assigning a unique =20
> variable. The variable gets populated from 6 different "buckets" of =20=
> values of each language after a master language variable is set.
>
> The question is how to store the text data. I guess the choices =20
> are either in individual languages php files, one for each =20
> language, and including the appropriate files. The other choice is =20=
> storing the text in a FileMaker database. The first option would =20
> be faster, but "more technical" to edit. The latter would require =20
> more processing power but be easier to edit and manage.
>
> A further complication is handling javascript forms validation in =20
> the various languages as well.
>
> Anyone been down this road before?
>
> Thanks
>
> Jonathan
> --=20
> 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
More information about the FX.php_List
mailing list