This repository was archived by the owner on Dec 31, 2024. It is now read-only.
Avaliblity to set keySeperator
#1693
zoey-kaiser
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!
We are using a flat JSON as our style guide. This means we avoid nested objects and separate namespaces by a
.
:Our setup
Instead of
We wanted to use some linked messages in our translation file, but sadly it looks for the object, instead of the flat translation:
Key seperator
As a workaround, we defined the reused translations with an
_
instead of a.
, however this is not nice, breaks conventions and causes confusion.While looking into how we can tell i18n, that we do not use objects, I stumbled across their configuration
keySeperator
(scroll down on this page or search for it: https://www.i18next.com/overview/configuration-options)As per them they state it:
Which seems like it would resolve our issue.
Questions
We use nuxt-i18n, which wraps this library and allows us to pass any configs we want to this library. After searching for a way to set the
keySeperator
, i was sadly left unsuccessful.Therefore my question is, how can we set the i18n options, that are set on init, inside vue i18n or where can I disable the key seperator, so it works for our project.
Thank you so much in advance ❤️
Beta Was this translation helpful? Give feedback.
All reactions