Translation
1 Attachment(s)
Hi,
Does anyone try to add the translation for modified modules? Like I have a title and I try to use the translation from admin end but it doesn't work. I have 2 languages in my store EN and AR. Does anyone try this? Thanks! |
Re: Translation
Are you talking about your own modules, or ready-made ones? Il the latter, which one?
|
Re: Translation
Hi ed,
My store has a 2 languages which is En and AR. We made a customize module which is for vendor listing and I would like also to translate it from EN to AR when a user try to use AR. I tried to use the translation in the admin but it doesn't work. Is there any code to able to work the translation? Thank you so much |
Re: Translation
Your custom module must be coded to support multiple languages. Any text label that you may want to translate should be outputted with the t method
t('text') - in twig files static::t('text') - in php files If you have models with text fields which needs to be translated you need to split the model to 2 classes to use languages - you can look how this is done for Product model for example - Product.php and ProductTranslations.php |
Re: Translation
Quote:
See also https://devs.x-cart.com/basics/creating-mutlilanguage-entity.html for more on this. |
All times are GMT -8. The time now is 08:17 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.