Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Technically, Mohamed Mansour's response is correct, so I've marked it as accepted. If anyone is interested, I have, however, found a functional solution by embedding the following block of code to the page or referencing to it as a separate JavaScript file:</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>var i18n = function() { function i(b) { b = b.querySelectorAll(l); for (var d, f = 0; d = b[f]; f++) for (var e = 0; e &lt; h.length; e++) { var c = h[e], a = d.getAttribute(c); a != null &amp;&amp; j[c](d, a) } } var j = { "i18n-content": function(b, d) { b.textContent = chrome.i18n.getMessage(d) }, "i18n-values": function(b, d) { for (var f = d.replace(/\s/g, "").split(/;/), e = 0; e &lt; f.length; e++) { var c = f[e].match(/^([^:]+):(.+)$/); if (c) { var a = c[1]; c = chrome.i18n.getMessage(c[2]); if (a.charAt(0) == ".") { a = a.slice(1).split("."); for (var g = b; g &amp;&amp; a.length &gt; 1;) g = g[a.shift()]; if (g) { g[a] = c; a == "innerHTML" &amp;&amp; i(b) } } else b.setAttribute(a, c) } } } }, h = [], k; for (k in j) h.push(k); var l = "[" + h.join("],[") + "]"; return { process: i } }();</code></pre> </div> </div> </p> <p>The above can be called once the document has loaded with <code>i18n.process(document);</code>.</p> <p>It will apply the correct localized string to the InnerHTML of any element with an appropriate <code>i18n-content</code> attribute. (Eg: <code>i18n-content="name"</code>.)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload