Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Récuperer variable dans site multilingue

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French
View previous topic :: View next topic  
Author Message
wesk
Smarty n00b


Joined: 13 Jan 2012
Posts: 1

PostPosted: Fri Jan 13, 2012 10:34 am    Post subject: Récuperer variable dans site multilingue Reply with quote

Bonjour à tous.

Je m'occupe de la maintenance d'un site e-commerce qui utilise smarty pour ses templates.

Le site est en multilingue.

Lorsque je veux connaître la valeur d'une variable, en utilisant echo(), ma page affiche un résultat différent selon le langage, ce qui en fin de compte est normal.

Exemple: echo($stock) Ma page me retourne "en stock" pour le francais et "in stock" pour l'anglais

Par contre si je fais un test

{if $stock == "en stock"} cela ne fonctionne pas.

Comment puis-je faire pour récupérer la valeur réelle de cette variable afin que je puisses effectuer des test par exemple IF

Merci d'avance pour votre réponse
Back to top
View user's profile Send private message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Fri Feb 03, 2012 9:30 am    Post subject: Reply with quote

Salut,

Ta variable n'est visiblement pas assigné, vérifie avec {$stock} dans ton tpl
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP