add translation po file to custom theme

by Matoeil   Last Updated October 11, 2018 15:07 PM

How to add a translation file to a theme?

i did

my_theme.info.yml:

'interface translation project': my_theme
'interface translation server pattern': themes/my_theme/translations/my_theme-%language.po

twig template:

{{ 'status'|t }}

/my_theme/translations/my_theme-fr.po:

msgid "status"
msgstr "statut"

followed by a

drush cr

it does not translate when i am in fr page ( default language being english )



Related Questions


Updated October 23, 2017 10:07 AM

Updated June 02, 2016 08:03 AM

Updated June 09, 2016 08:03 AM

Updated April 17, 2018 11:07 AM

Updated August 02, 2018 17:07 PM