Description
get_bundle
will only load the resources for a single locale, but supports fallback behavior for i18n formatters like date time format (at least it claims to). This bundle will provide no fallback behavior for missing messages.
get_bundles
will iterate over bundles for each locale in the list. I guess you could implement your own fallback behavior for messages here, but the i18n
formatters are not provided with a list of locales to fallback upon, so the behavior is different than get_bundle
. This seems a bit weird and inconsistent. Firefox is not using this crate, but as an example resource manager, the behavior is a bit odd and inconsistent.
To make them consistent you would either:
A. Remove fallbacking for get_bundle
and only provide a single locale, not a Vec of locales.
B. Pass the locale fallbacks to FluentBundle.
For B I'm unsure which behavior should provided for the fallback list, given:
Locale list: ["en-US", "en-CA", "pl", "es-ES"]
And en-CA
as the iteration step.
Would the locale list be:
i. A slice of the remaining;["en-CA", "pl", "es-ES"]
ii. A rearranged list:["en-CA", "en-US", "pl", "es-ES"]