Page 1 of 1

Smarty Internationalization- Best Methods

Posted: Wed Jul 07, 2004 12:08 pm
by NewfieBilko
Hi. I want to make my installation of smarty internationalized. I want it so that the user can pick from a drop down menu , which language he wishes to view the site in, then when he does, the site will see whatever language he picks, then SWAP all the words, headings,formatting of the page/site with the words from the respective language file. Each language file should contain all variables to store the words of each desired language, aka:

FRENCH:

Code: Select all

<?php
$string['active'] = 'Actif';
$string['activities'] = 'Activités';
$string['activity'] = 'Activité';
$string['activityclipboard'] = 'Activité en cours de déplacement : <b>$a</b>';
$string['activityiscurrentlyhidden'] = 'Désolé, cette activité n''est pas visible actuellement';
$string['activitymodule'] = 'Module d''activité';
$string['activityreport'] = 'Rapport d''activité';
$string['activityselect'] = 'Sélectionner cette activité pour la déplacer';
$string['activitysince'] = 'Activités observées';
$string['add'] = 'Ajouter';
$string['addadmin'] = 'Désigner comme administrateur';
$string['addcreator'] = 'Désigner comme responsable de cours';
$string['added'] = '$a ajouté(e)';
$string['addedtogroup'] = 'Ajouté au groupe $a';
$string['addedtogroupnot'] = 'Non ajouté au groupe $a';
$string['addedtogroupnotenrolled'] = 'Non ajouté au groupe $a, parce que non inscrit au cours';
$string['addinganew'] = 'Ajouter un(e) $a';
$string['addinganewto'] = 'Ajouter un(e) $a->what à $a->to';
$string['addingdatatoexisting'] = 'Ajout à des données existantes';
$string['addnewcategory'] = 'Ajouter une discipline';
$string['addnewcourse'] = 'Ajouter un cours';

?>

This is an example of one of the language files. I need to make all headings, titles and words on my templates into Variable calls so that it can swap the variables with whatever language is desired.

Now, this is not a small process, and I dont expect for someone to come up with some sort of answer. I am just looking for advise on where to start, or maybe if someone has done something like this before maybe could offer some advise on internationizaion, or EVEN if you have any thoughts on how to make all my titles, headings and words into variable calls , gimme some feedback. Smarty Enthuiseassts!!!
?>

Posted: Wed Jul 07, 2004 12:38 pm
by NewfieBilko
I will pay someone $50-100 US over paypal if they can present to me a working internationized Smarty system in which the user can choose from a menu which lanugage he/she wants to view the site in.

Posted: Wed Jul 07, 2004 12:53 pm
by NewfieBilko
LOL ok, feyd moved both posts here, thats great. I really just need a Smarty system, in which you can havethe user switch the Language variables.. OMG $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

Posted: Wed Jul 07, 2004 12:55 pm
by feyd
uh.. I locked it, because I already moved this thread to the Job Hunt section.. :P

Posted: Wed Jul 07, 2004 12:55 pm
by NewfieBilko
hahah yea sorry

Posted: Wed Jul 07, 2004 12:55 pm
by NewfieBilko
$150 Canadaian to whomever will supply this help to me

Re: Smarty Internationalization- Best Methods

Posted: Fri Mar 21, 2008 9:57 pm
by piins
Hi,

we've come up with i18n plugins for smarty. It allows you to use gettext as you do for php and combine it with smarty-variables as you wish...

you can use _, gettext, ngettext,... in your smarty template at any point.

Sources and Tutorial can be found here ath the Piins team blog

Hope this helps!

Bests,
Charly

Re: Smarty Internationalization- Best Methods

Posted: Sat Jan 01, 2011 7:27 am
by nashan.lamrekam
Hi.

I'm also looking for solution for my smarty based website. I found two extensions : Piins-smarty and Intsmarty
Can someone note on both? Which one is better and easier to use?

Would love any kind of information.
BTW The link to tutorials and guides in piins blog is not available.

Thanks!