Best practice on multilingual documents with fallback


I'm just sitting here and trying to find a good solution to build a
multilingual document which supports several languages, but also has its
default language.
Let's say I have something like this:
doc: {
defaultLanguage: "en",
localized: { "en": { ... english details here ...},
"fr": { ... french details here ... }

So I want kind of fallback mechanism which is using the local property as
Let's say french user visits the page and gets the "fr" part (by partial
selection). But if we got an german visitor it should select "en" which was
set by defaultLanguage.
Is this possible on ES part or will I have to do this on client-side and
transfere ALL languages first, then choose the right one?

Another idea would be to store the default language as separate property
(eg. localizedDefault), but then I'm still getting 2 language sets which is
still causing doubled traffic
Any idea on behalf of ES?

Thanks in advance.

1 Like