Language per Site 作者: Petr Sedlacek
Choose which languages each website gets. Overrides the Accept-Language header, navigator.language(s) in pages, frames and workers, and the JavaScript Intl locale. Supports *.domain wildcards and regular expressions.
扩展元数据
屏幕截图
关于此扩展
Firefox sends every website the same preferred languages. Language per Site lets you choose them per site: German for German shops, English for documentation, your own language everywhere else.
<b>How it works</b>
Rules are one line each: a site pattern and a comma-separated list of languages.
<code>example.com = en-GB, en, de</code> only this exact host
<code>.example.com = de, en</code> the domain and all its subdomains
<code>/^shop\d+.example.com$/ = fr</code> a regular expression on the hostname
<code> = en-US, en</code> every other site
<code>login.example.com = default</code> no override, use Firefox's own setting
The most specific rule wins: exact host, then regular expressions (first match from the top), then the longest *.domain, then *.
<b>Toolbar popup</b>
<ul><li>See which languages the current tab gets, and which rule gives them.</li><li>Save a rule for the current site at any level: the exact host, the whole domain, or every site.</li><li>Edit, delete (with Undo) and drag to reorder all your rules.</li></ul>
<b>Settings page</b>
<ul><li>The same rule list, plus a tester: type a URL to see which rule matches and the exact Accept-Language header it sends.</li><li>Edit as text for bulk changes and comments, with per-line validation.</li></ul>
<b>What gets overridden</b>
Not just the Accept-Language header. Sites can also read your languages from JavaScript, so the extension makes all of these agree:
<ul><li>The Accept-Language header on page loads, frames, images, scripts, fetch/XHR, WebSocket and worker requests. A header that a page sets itself on fetch/XHR is left alone.</li><li>navigator.language and navigator.languages in pages, iframes (including about:blank ones) and popups.</li><li>Dedicated, shared and service workers, including workers created from blob: and data: URLs.</li><li>The JavaScript default locale: Intl.DateTimeFormat, Intl.NumberFormat and the other Intl formatters, toLocaleString() on dates and numbers, localeCompare() and more. You can turn this part off.</li></ul>
<b>Limitations</b>
<ul><li>Things Firefox draws itself (date pickers, form validation messages, the PDF viewer) stay in Firefox's UI language. Extensions can't change them.</li><li>Changes apply to pages loaded after saving. Reload open tabs to update them.</li></ul>
<b>Privacy</b>
The extension collects nothing and makes no network requests of its own. Your rules are stored locally in Firefox. The source code is on GitHub.
<b>How it works</b>
Rules are one line each: a site pattern and a comma-separated list of languages.
<code>example.com = en-GB, en, de</code> only this exact host
<code>.example.com = de, en</code> the domain and all its subdomains
<code>/^shop\d+.example.com$/ = fr</code> a regular expression on the hostname
<code> = en-US, en</code> every other site
<code>login.example.com = default</code> no override, use Firefox's own setting
The most specific rule wins: exact host, then regular expressions (first match from the top), then the longest *.domain, then *.
<b>Toolbar popup</b>
<ul><li>See which languages the current tab gets, and which rule gives them.</li><li>Save a rule for the current site at any level: the exact host, the whole domain, or every site.</li><li>Edit, delete (with Undo) and drag to reorder all your rules.</li></ul>
<b>Settings page</b>
<ul><li>The same rule list, plus a tester: type a URL to see which rule matches and the exact Accept-Language header it sends.</li><li>Edit as text for bulk changes and comments, with per-line validation.</li></ul>
<b>What gets overridden</b>
Not just the Accept-Language header. Sites can also read your languages from JavaScript, so the extension makes all of these agree:
<ul><li>The Accept-Language header on page loads, frames, images, scripts, fetch/XHR, WebSocket and worker requests. A header that a page sets itself on fetch/XHR is left alone.</li><li>navigator.language and navigator.languages in pages, iframes (including about:blank ones) and popups.</li><li>Dedicated, shared and service workers, including workers created from blob: and data: URLs.</li><li>The JavaScript default locale: Intl.DateTimeFormat, Intl.NumberFormat and the other Intl formatters, toLocaleString() on dates and numbers, localeCompare() and more. You can turn this part off.</li></ul>
<b>Limitations</b>
<ul><li>Things Firefox draws itself (date pickers, form validation messages, the PDF viewer) stay in Firefox's UI language. Extensions can't change them.</li><li>Changes apply to pages loaded after saving. Reload open tabs to update them.</li></ul>
<b>Privacy</b>
The extension collects nothing and makes no network requests of its own. Your rules are stored locally in Firefox. The source code is on GitHub.
评分 0(1 位用户)
权限与数据
更多信息