Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Fall back to parent cultures from the supported list when the desired culture is not available or known #112

Closed
Eilon opened this issue Oct 14, 2015 · 4 comments
Assignees
Milestone

Comments

@Eilon
Copy link
Member

Eilon commented Oct 14, 2015

Have loc selectors fall back to parent cultures from the supported list when the desired culture is not available or known. E.g. if the request culture is “en-Damian” and the supported cultures has “en”, then fall back to that.

@Eilon Eilon added this to the Backlog milestone Oct 14, 2015
@hishamco
Copy link
Contributor

What if the supported cultures have "en-US" should fallback to that or return null?

@Eilon
Copy link
Member Author

Eilon commented Oct 14, 2015

@hishamco that depends on what the supported cultures are and on what the requested culture is. Can you give a more complete example?

BTW, either way we don't plan on doing this work item now - it's on the Backlog.

@miloush
Copy link

miloush commented Nov 2, 2015

@hishamco null would be the current behavior in .NET resources fallback and there might be sensitive cases where you don't want to mix it up. I agree that fallback to the parent culture is an important feature, though, and probably provider specific (if you set the cookie, set something you don't need fallback for).

@DamianEdwards DamianEdwards modified the milestones: 1.0.0-rc2, Backlog Dec 12, 2015
@DamianEdwards DamianEdwards self-assigned this Dec 12, 2015
DamianEdwards added a commit that referenced this issue Dec 15, 2015
- Enabled by default and configred by RequestLocalizationOptions.FallbackToAncestorCulture/FallbackToAncestorUICulture
- Tries all candidate cultures first before trimming the list to parents and trying again, until a match is found or none is found
- Updated functional tests to cover fallback case
- #112
DamianEdwards added a commit that referenced this issue Dec 15, 2015
- Enabled by default and configred by RequestLocalizationOptions.FallbackToAncestorCulture/FallbackToAncestorUICulture
- Tries all candidate cultures first before trimming the list to parents and trying again, until a match is found or none is found
- Updated functional tests to cover fallback case
- #112
DamianEdwards added a commit that referenced this issue Dec 15, 2015
- Enabled by default and configred by RequestLocalizationOptions.FallbackToAncestorCulture/FallbackToAncestorUICulture
- Tries all candidate cultures first before trimming the list to parents and trying again, until a match is found or none is found
- Updated functional tests to cover fallback case
- #112
DamianEdwards added a commit that referenced this issue Dec 15, 2015
- Enabled by default and configured by RequestLocalizationOptions.FallbackToAncestorCulture/FallbackToAncestorUICulture
- Tries all candidate cultures first before trimming the list to parents and trying again, until a match is found, depth limit is reached, or none is found
- Updated functional tests to cover fallback case
- #112
@DamianEdwards DamianEdwards reopened this Dec 16, 2015
@DamianEdwards
Copy link
Member

Going to make this depth-first instead so re-opening.

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

No branches or pull requests

4 participants