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

Change the mainlang behavior to not return a nil if no lang found #8

Closed
7 tasks done
Tracked by #6
syphax-bouazzouni opened this issue Mar 2, 2022 · 1 comment
Closed
7 tasks done
Tracked by #6

Comments

@syphax-bouazzouni
Copy link

syphax-bouazzouni commented Mar 2, 2022

The new Algorithm

  • Come back the code of NCBO
  • Make the main lang variable
  • Make the secondary lang variable
  • First, see if we find a literal that match the main lang
  • If not, then if we find a literal without language tag take the first one or all if the list
  • If not, then see if we find a literal that matches the secondary lang
  • Else take all the ones in the literals array or the first if not list

Exemple

If we set ["en", "fr"] in main_laguages config variable.
We will except to have in order :

  1. Attribute values with "en" language tag and values with no language tags
  2. Otherwise we take values with "fr" language.
  3. Else take all values in the other languages
@syphax-bouazzouni
Copy link
Author

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

No branches or pull requests

1 participant