From e2fef91ab0c2ae132d038660ec7b34f69ad4cc1e Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 29 Aug 2024 11:40:13 +0200 Subject: [PATCH] Update nested.md args are not optional --- docs/guides/nested.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/guides/nested.md b/docs/guides/nested.md index e7f2af30..6848ad3f 100644 --- a/docs/guides/nested.md +++ b/docs/guides/nested.md @@ -28,10 +28,13 @@ Here is an example of how this looks in your translation files ``` ```typescript +i18n.t('test.PAGE_HOME.TITLE', {args: {} }) +// => Home to this World + i18n.t('test.PAGE_HOME.SUBTITLE', {args: { username: 'Toon' } }) // => Hello Toon, this is the home page ``` :::tip The [`formatter`](guides/formatting.md) is applied before doing nested translations. This way you can pass on arguments to your nested translations! 🎉 -::: \ No newline at end of file +:::