I need add some custom text in Prestashop template file, but there are two languages in my store, and I want to add these contents in different language statically? Can I check current language by language id?
标签:
prestashop
相关问题
- Extend prestashop webservice resource
- How to integrate msg91 php api with Prestasms or P
- Prestashop 1.6 extend max size of product feature
- PrestaShop Admin Module Controller Not Found
- Prestashop Error 404 at moving to server
相关文章
- Prestashop 1.6 Create Module to Display Carrier Fi
- Prestashop and web service(Restful), HttpURLConnec
- How to change content of order confirmation email
- Search products in a specific category
- How to display product price with and without tax
- Prestashop Web Service API keeps asking for authen
- Get image url in prestashop
- PrestaShop create customer
statically
If you see on editorial block you will understand how to do that.
you can build a module and then hook that to the perticular area.
and generate the text box like
in this way it will save language wise value
You have multiple ways to achieve this goal depending on the kind of .tpl file you are editing:
If it is a .tpl in your Theme, the easiest way is:
{l s='My text to translate'}
If it is .tpl file included in a module, you should do the following:
{l s='My text to translate' mod='modulename'}
In both situations, PrestaShop will automatically translate these strings into the language currently selected by the end user.
If you prefer to manually handle the translation process, you should instead do:
{if $lang_iso == 'en'}English{else}Other language{/if}