Smarty Internationalization- Best Methods

Looking to hire a PHP developer for a paid position? Looking for a paid PHP job? Want to post your resume? Let the job hunt begin...

Moderator: General Moderators

Post Reply
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Smarty Internationalization- Best Methods

Post 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!!!
?>
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post 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.
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post 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 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Last edited by NewfieBilko on Wed Jul 07, 2004 12:55 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

uh.. I locked it, because I already moved this thread to the Job Hunt section.. :P
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

hahah yea sorry
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

$150 Canadaian to whomever will supply this help to me
piins
Forum Newbie
Posts: 1
Joined: Fri Mar 21, 2008 9:54 pm

Re: Smarty Internationalization- Best Methods

Post 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
nashan.lamrekam
Forum Newbie
Posts: 1
Joined: Sat Jan 01, 2011 6:54 am

Re: Smarty Internationalization- Best Methods

Post 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!
Post Reply