Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localized fallback language not working #125

Closed
ghost opened this issue Jul 18, 2017 · 2 comments
Closed

Localized fallback language not working #125

ghost opened this issue Jul 18, 2017 · 2 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jul 18, 2017

So there are like 9 Locales in my project and only 1 of them is fully filled in. I set the fallback Locale on all of the other languages to the one which is filled (en-US). I added every single locale to the space locales annotation field and I sync.

What happens afterwards is quite strange. I would expect to see every not filled in item being the english fallback locale text. So that when I query I would get the english text as fallback.

This doesn't happen. If I check out the database every non contentful Resource() field is empty/null. Even the location which isn't even tagged in contentful as localized at all. Am I missing something here?

-Update: I also noticed that setting a partly filled in language as only locale in the space will leave the not filled in fields empty. While I would expect them to be filled with the fallback Locale.

@ghost
Copy link
Author

ghost commented Jul 18, 2017

Okay, so after diving deep in the source code of Vault I found out there is idd a mechanism fetching the default locale resource if the chosen locale has none. Then I found out that the default locale must be the first in the list of locales within the space, otherwise nothing happens.

It was a bit of a struggle but now everything seems to be working alright

@mariobodemann
Copy link
Contributor

Hey,

interesting to know and thanks for reporting it. I'll check on the next release of Vault if there is an easier way of applying the fallback logic to vault ...

Thanks, Mario

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant