designsystemet icon indicating copy to clipboard operation
designsystemet copied to clipboard

Storefront: Better handling on language for "nynorsk" and "bokmål"

Open Febakke opened this issue 10 months ago • 2 comments

there are two issues.

Siteimprove are tagging a lot of "nynorsk" words as spelling errors. Because it thinks it should be "bokmål". We can go trough and just ignore it, or find a way to let Siteimprove now that it is "nynorsk"

We are using the language code no. This just means norwegian language and is not specifying if its "nynorsk" or "bokmål". We could use nb and nn to specify this more.

This is what Tilsynet says:

Når det gjelder språk på siden, er det tilstrekkelig å angi språkkode no, når språket er norsk. Vi anbefaler likevel at en velger enten no-nn eller no-bm, som også angir målformen. Dette sørger for en mer presis gjengivelse og uttale av teksten i ulike brukeragenter, for eksempel når hjelpemiddelteknologi som leser opp tekst for brukeren.

Source

Febakke avatar Mar 06 '25 13:03 Febakke

https://mdxjs.com/guides/frontmatter might be of help here to define lang on individual articles/sites.

Pseudo code for support something like this.

<html lang="no">
  <article lang="no-nb">
  <article lang="no-nn">

mimarz avatar Mar 26 '25 09:03 mimarz

Since this issue was created we have moved to react router 7 with norwegian and english support. This is still an issue.

A possiblity now, that we did not have earlier, is to add a lang property to our frontmatter, since we use that to supply metadata to articles.

Barsnes avatar Jun 20 '25 11:06 Barsnes