Define default translation inside component #1812
Christilut
started this conversation in
General
Replies: 1 comment 1 reply
-
You can use it. $t(key: Path, defaultMsg: string, options: TranslateOptions): string; |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm wondering if something like this is possible:
What I mean there is that I define a tag (
message.hello
) and a stringHello World
for my default language. This makes editing components much faster and I don't need to find a tag in the JSON files.For each language I would still have a JSON file (or one big JSON) except for the default language. The default language is always defined inside the components. With HMR it's a nicer experience too, when editing the default language right inside the component.
With this approach I can fully focus on my own, default, language and translations are not in the way at all. An app full of only tags is not great for the developer.
Beta Was this translation helpful? Give feedback.
All reactions