Thread: Translation
View Single Post
  #4  
Old 09-15-2019, 05:24 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote