Skip to content

Conversation

xob
Copy link

@xob xob commented Nov 20, 2017

For my project, we wanted to have a fallback waterfall. We have 6 languages (en, fr, de, nl, it, es), and we wanted to be able to define that en falls back to es, then fr, then de, then.. We wanted to do that for all our languages.

In this PR, I kept the original fallback support (en_GB falling back to en), and added the fallback waterfall functionality.

Any and all feedback is welcome.

Sort of fixes #210, which is already closed.

@ngehlert
Copy link

I'm curious for the use case. why do you assume someone who speaks english understands spanish, frensh and german? wouldn't the frontend look completely weird if there is the potential that 6 different languages would be visible?

@xob
Copy link
Author

xob commented Feb 20, 2019

The use case is that we prefer showing the wrong language to users (with the waterfall defined as the languages that the users have the biggest chance of understanding first), instead of showing a translation error, such as a translation key (my.project.title).

Sure, it's still wrong, but it's arguably "less wrong" than showing the translation keys.

@rubenv
Copy link
Owner

rubenv commented Feb 21, 2019

Sure, it's still wrong, but it's arguably "less wrong" than showing the translation keys.

That's just fixing wrong with more wrong :-)

Gettext is designed to have English as translation keys. If you want to use symbolic translation keys, there are probably better solutions available.

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

Successfully merging this pull request may close these issues.

Fallback improvement
3 participants