tematres / TemaTres-Vocabulary-Server

Web application for management formal representations of knowledge, like controlled vocabularies, taxonomies, thesauri and glossaries
https://vocabularyserver.com
118 stars 52 forks source link

Trouble with language codes in v. 3.4 #81

Open olufine opened 1 year ago

olufine commented 1 year ago

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:

`

Sudoku Brukt til bøker med sudoku-oppgaver. 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]. Sudoku 2020-06-18 11:05:39 2021-04-30 12:13:49 ` 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 commented 1 year ago

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 :/)

olufine commented 1 year ago

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