Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Timber & WPML string translation

Hi I'm using Timber and what it used to be as simple as

_e('string', 'theme') 

to translate strings with WPML, seems to not been working on Timber any idea on how to translate strings?

I have tried the following and nothing is working

{{ _e('string') }} & {{ _('string') }}

{{ _e('string', 'theme') }}

{{ function("icl_translate", 'theme', 'string_identifier', 'string) }}

{{ dump(ICL_LANGUAGE_CODE) }} // Doesn't return anything, so not an option either 

Thanks!

like image 304
Mario Sanchez Maselli Avatar asked Feb 20 '17 13:02

Mario Sanchez Maselli


1 Answers

Yes I use this;

{{ __('All items', 'theme') }}

And it's working perfectly.

like image 119
colin Avatar answered Oct 12 '22 23:10

colin