|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
wesk Smarty n00b
Joined: 13 Jan 2012 Posts: 1
|
Posted: Fri Jan 13, 2012 10:34 am Post subject: Récuperer variable dans site multilingue |
|
|
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 |
|
adn Smarty Regular
Joined: 31 May 2011 Posts: 91
|
Posted: Fri Feb 03, 2012 9:30 am Post subject: |
|
|
Salut,
Ta variable n'est visiblement pas assigné, vérifie avec {$stock} dans ton tpl |
|
Back to top |
|
|
|
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
|