Open gustaveWPM opened 11 months ago
You might be able to use the defineLocale()
helper (from createI18nClient
), though it probably doesn't work well with nested-objects locales. It hasn't been touched and used since a long time, but the main idea is here.
We'll need to make it work with both dot-notation and object-notation locales, and add it to the documentation.
I find it unfortunate that currently, there is no documentation regarding how to enforce different locales to be exhaustive.
https://next-international.vercel.app/docs/writing-locales
I think we should be able to ensure that every (or just some) locales exhaustively implement an another locale schema.
At the moment, I proceed like this:
So,
MakeVocabType
could be:And used like:
Also, idk if
MakeVocabType
would be a good name for this. I guess you would prefer to name thisCreateVocabType
, as theCreateParams
type in international-types.