Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

– Unable to choose the main Norwegian language

  • #2540
    Avatar photo[anonymous]

    I cannot find the primary Norwegian language setting in language selection.

    There are at least four languages in Norway:

    – Norsk bokmål

    – Norsk nynorsk

    – Sami

    – Kven

    More info at https://en.wikipedia.org/wiki/Languages_of_Norway

    “Norsk bokmål” is the most used language with the HTML code:

    <html lang=nb-NO>

    “Norsk Bokmal”

    “Norsk Nynors” is mostly used in the western part of Norway. Usually not used in the Northern part and, middle part and northern part of Norway

    <html lang=nn-NO>

    https://en.wikipedia.org/wiki/Languages_of_Norway

    #2583
    Avatar photo[anonymous]

    So If I understand you correctly, Publii has support for ‘Norsk nynorsk’ and not for ‘Norsk bokmal’?

    I guess Publli uses some kind of library for the spell checking. If we know which library Publii uses we could check if it has the option for ‘Norsk bokmal’.

    Tomasz: do you know which language library Publii uses?

    #2585
    Avatar photo[anonymous]

    Correct.

    Not support for ‘Norsk bokmal”

    ‘Norsk bokmal”is the most used language in Norway.

    #2628
    Avatar photo[anonymous]

    Hi,

    For such cases there is an option “Custom language code” which allows you to set any language code 🙂

    We do not want to include too much languages as it will lead to a very long list of languages on the list.

    #2633
    Avatar photo[anonymous]

    Oh nice! I hadn’t noticed that option!

    Is there a list of codes you can choose from? Publii uses some kind off online spell check service?

    #2636
    Avatar photo[anonymous]

    The language code does not affect the spellchecker at this moment. In fact e.g. on macOS it detects the language automatically if it is  supported. For the hunspell-based platforms we need to check how to set the language and we need to fix it.

    Regarding the language codes: https://www.w3schools.com/tags/ref_language_codes.asp

    #2639
    Avatar photo[anonymous]

    Publii is using something like this?
    https://github.com/electron-userland/electron-spellchecker

    So it basically uses the spell check function of Chrome/Chromium?

    #2640
    Avatar photo[anonymous]

    Electron 8 has built-in spellchecker – the same which is used as in Chromium.

    #2641
    Avatar photo[anonymous]

    Sorry for misunderstanding.

    Correct language indication is not about spelling.

    Properly specifying languages in the HTML code is about SEO – Search Engine Optimization – and SEM – Search Engine Marketing –

    For a good result, it is important to follow the instructions given here:

    Google Search Console
    https://search.google.com/search-console/about

    and

    Webmaster Tools – Bing
    https://www.bing.com/toolbox/webmaster

    and

    Yandex Webmaster
    https://webmaster.yandex.com/welcome/

    and many more.

    When the wrong language is set, the site can get unnecessarily poor ranking in the search engine result.

    “Norwegian Bokmål” and “Norwegian Nynorsk” are two different languages.

    When you specify the wrong language in the HTML code, you counteract the recommendations given in the links above.

    #2653
    Avatar photo[anonymous]

    Thanks for the clarification! Now I understand the reason why you needed the country code!

    #2655
    Avatar photo[anonymous]

    Thank you.