This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
IStringLocalizer.GetAllStrings should support an arg to specify culture walk behavior #23
Comments
Interested in your thoughts @davidfowl @muratg @Eilon @lodejard |
I like it. |
So if you have "colour" in "en", and nothing in "en-US", the translation for "en-US" would be "colour", which is not correct until such time as you "override" it as "color" in "en-US"? Perhaps it should be off by default to avoid unexpected behaviour? (sorry, I know public feedback was not requested 😨) |
DamianEdwards
added a commit
that referenced
this issue
May 27, 2015
@glen-84 this behavior is in line with the existing |
Okay, fair enough I suppose. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Depends on #18
Currently,
IStringLocalizer.GetAllStrings
will return the union of all strings for the current culture and all ancestors of the current culture. E.g. if the current culture is "en-US" and it contains a single string "Hello", and the culture "en" contains a single string "Goodbyte", the call toIStringLocalizer.GetAllStrings
for "en-US" will return both the "Hello" and "Goodbye" strings.This behavior may not always be desirable (e.g. it differs to how
ResourceManager.GetResourceSet
works). As such, we should support a way to specify the behavior during the call, e.g.GetAllStrings(includeAncestorCultures: false);
The default behavior should still be to include strings from ancestor cultures.
The text was updated successfully, but these errors were encountered: