five Posted November 17, 2022 Share Posted November 17, 2022 Buenas, cómo se puede asignar en smarty una traducción a una variable Os pongo un ejemplo: {l s='Relevance' d='Modules.Facetedsearch.Shop'} Me gustaría que fuera en un IF por ejemplo {if $listing.sort_selected == l s='Relevance' d='Modules.Facetedsearch.Shop' } Se q está fatal , pero es para q se me entienda. 1K Gracias ! Link to comment Share on other sites More sharing options...
ventura Posted November 25, 2022 Share Posted November 25, 2022 Tienes ejemplos en la documentacion de Prestashop <div>{l s='List of products by supplier %s' sprintf=[$supplier.name] d='Shop.Theme.Catalog'}</div> https://devdocs.prestashop-project.org/8/development/internationalization/translation/using-the-translator/ Link to comment Share on other sites More sharing options...
five Posted November 28, 2022 Author Share Posted November 28, 2022 Muchas gracias por la respuesta Os pongo la solución que nos ha dado Ventura {assign var='translatedString' value={l s='Text containing single quote' d='Modules.Mymodule.Shop'}} Muy agradecido, saludos!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now