Depending of a the context of use, I need to “translate” some words in the same locale.
An example :
in the first context, the word “team” is called a "team"
in the second context, the word “team” is called a "group"
in the third context, the word “team” is called a “troop”
What is the best way to do that with the localisation functions of cakephp 3 ?
I can use :
You can use the __d(‘domain’, ‘key’) or __x(‘context’, ‘key’) function to achieve that. Note that you need multiple translation files when you want to use the __d()-function (where the name of the translation file refers to the ‘domain’.
Please have a look here for further detail:
__d is the solution for me.