Skip to main content


nestjs-i18n supports nested translations.

You can make nested translations by using this function.


To pass along arguments use

"WELCOME": "$t(auth.WELCOME, {{ \"username\": \"{username}\" }})"

Here is an example of how this looks in your translation files

"HELLO": "World",
"WELCOME": "Hello {username}",
"TITLE": "Home to this $t(auth.HELLO)",
"SUBTITLE": "$t(auth.WELCOME, {{ \"username\": \"{username}\" }}) this is the home page"
i18n.t('test.PAGE_HOME.SUBTITLE', {args: { username: 'Toon' } })
// => Hello Toon, this is the home page

The formatter is applied before doing nested translations. This way you can pass on arguments to your nested translations! 🎉