Passer au contenu
SilktideAide

How languages work

Silktide works out a primary language for every page it tests, because several checks cannot work without one: a spellchecker needs to know whether "colour" is correct, a grammar checker needs the right rules, and readability needs a formula calibrated for the language. If the language is wrong, those results are wrong too, so it is worth understanding how the language is decided.

A website can use one or many languages, and Silktide does its best to work out which applies to each page. Its best guess can be wrong, which is why every page records not just its language but where that language came from, and why you can correct it at every level.

Where a page's language comes from

For each page, Silktide uses the first of these that applies:

  1. Manual override. A language you set for that one page, from the language menu at the top of the Inspector.
  2. URL rule. A rule you created assigning a language to matching URLs, such as everything under /fr/. Rules are managed on the Languages screen.
  3. The page's own declaration. What the page says about itself in its lang attribute, reconciled against your website's configured languages (see below). This is used when Trust page-declared language is enabled.
  4. Website default. The first language configured for the website, used when nothing better is available.

The Languages screen shows each page's resolved language and which of these sources produced it, so you can audit exactly where every value came from.

Websites declare their expected languages

Every website in Silktide has one or more configured languages, set in the website's Advanced settings. These are the languages you expect the website to contain, and they anchor everything above:

  • They are the fallback when a page gives no usable signal.
  • They guide how a page's own declaration is interpreted. A page declaring plain en on a website configured for British English resolves to British English; a declaration that exactly matches a configured language is used as-is; an ambiguous declaration is resolved to a sensible regional default.
  • Spelling checks against them, which is how "color" can be right on one website and wrong on another.

You can also add optional languages: languages the website may contain in places, which spelling should recognize without treating them as the norm.

Trusting what pages declare

Accounts that started on Silktide 5 trust each page's declared language by default: if a page says it is written in Swedish, Silktide assumes the website is describing itself accurately and tests it as Swedish. This is new behavior. Previously, Silktide only used the languages you configured, and every website on an account that started before Silktide 5, including websites added since, keeps working that way until you enable Trust page-declared language in Advanced settings.

Trusting the page is usually right, but pages sometimes lie: a common template lang="en" on translated content is one of the most frequent causes of wrong spelling and grammar results. When that happens, fix the page's HTML if you can (it is also an accessibility issue), or override Silktide with a URL rule or a per-page override.

Correcting the language

  • One page is wrong: open it in the Inspector and set the language from the dropdown at the top. This beats every other source.
  • A section is wrong: add a URL rule on the Languages screen, for example assigning French to every URL starting /fr/. First matching rule wins.
  • Everything is wrong: check the website's configured languages in Advanced settings, and whether trusting page-declared language is appropriate for this site.

Changes to rules and settings take effect on the next test. An Inspector override changes the page's language straight away and is kept across retests, but the page's spelling, grammar and readability results only change when it is next tested. Use Retest in the Inspector to see them now.

What the language affects

  • Spelling checks words against dictionaries for the website's languages and for the page's own language, plus your spelling dictionary. A word is accepted if any of them contains it, so a Spanish page on an English website is checked in both. A per-page override or URL rule that names another variant of the website's language, such as British English on a US English website, replaces it on that page, so American spellings are reported there.
  • Grammar checks each page in one language: the one the page names (a per-page override, a URL rule, or its declared language when trusted), or the website's language when it has only one. A page that could be in several of the website's languages, and does not say which, is not grammar-checked rather than checked against the wrong rules.
  • Readability applies a formula calibrated per language, chosen in readability settings. Languages without a calibrated formula are not readability-scored.
  • Accessibility checks also care: a page whose declared language does not match its content is itself a failure, because pronounce the page using the declared language.

Learn more

Dernière mise à jour

Cette page vous a-t-elle été utile?