Search code examples
wordpresstwigwpmltimber

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!


Solution

  • Yes I use this;

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

    And it's working perfectly.