Skip to content

Specify language when translating templates? #321

Discussion options

You must be logged in to vote

Without $lang parameter there is only one cached compiled version of template that translates strings every time it is rendered. If you use $lang parameter then cached compiled template contains translated strings for given language (translated at compile time) so there is no need to translate them every time during rendering. And yes there would be cached compiled template for every language with language specific strings already translated.

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@yongtw123
Comment options

@MartinMystikJonas
Comment options

@yongtw123
Comment options

Answer selected by yongtw123
Comment options

You must be logged in to vote
5 replies
@yongtw123
Comment options

@MartinMystikJonas
Comment options

@dg
Comment options

dg Nov 14, 2022
Maintainer

@yongtw123
Comment options

@MartinMystikJonas
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants