Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add language variant filtering support to the LanguageParameter #56

Open
1 task
petrsvihlik opened this issue Jun 28, 2017 · 2 comments
Open
1 task
Labels
enhancement filters Stories related to queries and filters. good first issue groomed The issue has been groomed and should be in a good shape. hacktoberfest help wanted up-for-grabs

Comments

@petrsvihlik
Copy link
Contributor

petrsvihlik commented Jun 28, 2017

Motivation

Currently, the LanguageParameter does not support filtering based on language variants.

var response = await DeliveryClient.GetItemsAsync<Article>(new LanguageParameter("en-US"));

It would be nice if it was possible to ignore language fallbacks as described in the documentation:
image

This means that the LanguageParameter needs to be enriched with filtering based on system.language on top of the currently present language.

Design guidelines

Let's create two new constructors:

// This one will cause the system.language to be set instead of language
public LanguageParameter(string language, bool ignoreFallbacks = false)

// This one will set both language and system.language
public LanguageParameter(string language, string languageVariant = null)

The GetQueryStringParameter() method will need to be adjusted to return one or two query parameters in a single string.

  • Don't forget to add unit tests
@JanLenoch JanLenoch added this to the Prioritization milestone May 22, 2018
@JanLenoch JanLenoch removed this from the Prioritization milestone May 22, 2018
@JanLenoch JanLenoch added the groomed The issue has been groomed and should be in a good shape. label Aug 10, 2018
@kordys

This comment has been minimized.

@petrsvihlik

This comment has been minimized.

@petrsvihlik petrsvihlik changed the title Add filters for system attributes (language, ...) Add language variant filtering support to the LanguageParameter Aug 5, 2019
@petrsvihlik petrsvihlik added the filters Stories related to queries and filters. label Jan 22, 2021
@nkooman nkooman mentioned this issue Oct 30, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement filters Stories related to queries and filters. good first issue groomed The issue has been groomed and should be in a good shape. hacktoberfest help wanted up-for-grabs
Projects
None yet
Development

No branches or pull requests

3 participants