buda-base / public-digital-library

http://library.bdrc.io
5 stars 6 forks source link

search language selection on Cambodia website #599

Open berger-n opened 3 years ago

berger-n commented 3 years ago

new configuration with less possible languages in the search and different UI languages (English and French only)

berger-n commented 3 years ago

done for UI language: http://library-dev.bdrc.io/

Screenshot_20211108_151750

(it uses an alternate config file)

what about language detection here, what language should be available? do you think we can use same language detection but pruning out tibetan and chinese in returned possible values? or something better that can detect french?

eroux commented 3 years ago

so, the UI would be in 3 languages: English, French and Khmer (we should add a Khmer translations file). There's no metadata in French so no need to add detection. Khmer can be detected easily with its Unicode range

berger-n commented 3 years ago
eroux commented 3 years ago

oh I see, then km, pi-Khmr, en (and the rest in any order)

berger-n commented 3 years ago

ok thanks! so I think fr and en should be:

   "fr":[ "fr", "en", "pi-Khmr", "km" ],
   "en":[ "en", "pi-Khmr", "km" ],
berger-n commented 3 years ago

Screenshot_20211108_183002

should we allow capital letters here? or use "pi-khmer" instead?

eroux commented 3 years ago

ah, right, yes, all codes should be lower cased so pi-khmr

berger-n commented 3 years ago

ok thanks!