Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Characters outside the ISO Latin-1 set are not permitted in URLs according to <a href="http://www.w3.org/Addressing/URL/uri-spec.html" rel="nofollow noreferrer">this spec</a>, so Chinese strings would be out immediately.</p> <p>Where the product name can be localised, you can use urls like <code>&lt;DOMAIN&gt;/&lt;LANGUAGE&gt;/DIR/&lt;PRODUCT_TRANSLATED&gt;</code>, e.g.:</p> <pre><code>http://www.example.com/en/products/cat/ http://www.example.com/fr/products/chat/ </code></pre> <p>accompanied by a <a href="http://www.htmlist.com/how-to/a-simplemod_rewrite-tutorial/" rel="nofollow noreferrer">mod_rewrite</a> rule to the effect of:</p> <pre><code>RewriteRule ^([a-z]+)/product/([a-z]+)? product_lookup.php?lang=$1&amp;product=$2 </code></pre> <p>For the first example above, this rule will call <code>product_lookup.php?lang=<strong>en</strong>&amp;product=<strong>cat</strong></code>. Inside this script is where you would access the internal translation engine (from the <code>lang</code> parameter, <strong><code>en</code></strong> in this case) to do the same translation you do on the user-facing side to translate, say, "Chat" on the French page, "Cat" on the English, etc.</p> <p>Using an external translation API would be a good idea, but tricky to get a reliable one which works correctly in your business domain. Google have opened up a <a href="http://research.google.com/university/translate/" rel="nofollow noreferrer">translation API</a>, but it currently only supports a limited number of languages.</p> <blockquote> <ul> <li>English &lt;=> Arabic</li> <li>English &lt;=> Chinese</li> <li>English &lt;=> Russian</li> </ul> </blockquote>
 

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