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

Trouble with language codes in v. 3.4 #81

Open
olufine opened this issue Jan 6, 2023 · 2 comments
Open

Trouble with language codes in v. 3.4 #81

olufine opened this issue Jan 6, 2023 · 2 comments

Comments

@olufine
Copy link

olufine commented Jan 6, 2023

Hi,
After installing v3.4. the language tags for the main vocabulary comes out with region. Three issues:

  1. The region given for Norwegian bokmål is not correct. as far as I know, "NB" is no region, whereas "NO" is. See example below.
  2. Region are given only for terms in the main vocabulary, not for terms in the connected target vocabularies, nor for notes. (This has probably something to do with the fact that Norwegian is not included in language list in TemaTres, hence we've had to add Norwegian and Sami ourselves.
  3. We don't really want region info in the first place. Our vocabularies are published in another platform (using the skos export from TemaTres), and right now it is not convenient for us to start using language tags with regions.

Example: The concept "Sudoku" as TemaTres exports it to SKOS:

<skos:Concept rdf:about="http://tematres.nb.no/vocab/887"> <skos:prefLabel xml:lang="nb-NB">Sudoku</skos:prefLabel> <skos:scopeNote xml:lang="nb">Brukt til bøker med sudoku-oppgaver. </skos:scopeNote> <skos:definition xml:lang="nb">Sudoku, også kalt su doku, er et tallspill som går ut på å plassere sifre i rutemønstre. Det klassiske og opprinnelige rutemønsteret består av 9×9 ruter som igjen er delt inn i ni mindre bokser på 3×3 ruter [Wikipedia]. </skos:definition> <skos:inScheme rdf:resource="http://tematres.nb.no/vocab"/> <skos:broader rdf:resource="http://tematres.nb.no/vocab/479"/> <skos:exactMatch> <skos:Concept rdf:about="http://tematres.nb.no/vocab/888"> <skos:prefLabel xml:lang="nn">Sudoku</skos:prefLabel> </skos:Concept> </skos:exactMatch> <dct:created>2020-06-18 11:05:39</dct:created> <dct:modified>2021-04-30 12:13:49</dct:modified> </skos:Concept>

In our installation, we use:
$CFG["ISO639-1"]=array( "no"=>array("no","Norwegian"), "nb"=>array("nb","Norwegian (bokmål)"), "nn"=>array("nn","Norwegian (nynorsk)"), "se"=>array("se","Northern Sami"), "ab-AB"=>array("ab-AB", "Abkhazian"), ...

So, where does the tag 'nb-NB' come from? I'm hoping for your help on this.

@tematres
Copy link
Owner

Hi @olufine :) sorry for delay in response :/ we are on summer holiday in Argentina :). In the last update (3.3 and 3.4) we adopt aprouch oriented to normalize the language code to lang_code-REGIONAL format (xx-XX). In the cases where there are no regional variant, we repeat the language code. We force the normalization using specific function (normalizeLangCode()).
After to read your explanation, I have strong doubts about our aprouch, may be we need to revert this changes and support 2 and 5 chars lang codes once the same time.
¿do you agree with this aprouch?

(sorry about my english :/)

tematres added a commit that referenced this issue Mar 27, 2023
@olufine
Copy link
Author

olufine commented Mar 31, 2023

Thanks, I'm looking forward to install the future release in which this is included :-)

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

No branches or pull requests

2 participants