multilingual_sites
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| multilingual_sites [2018/02/25 08:54] – external edit 127.0.0.1 | multilingual_sites [2026/03/21 10:11] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | |||
| ====== Multilingual Sites ====== | ====== Multilingual Sites ====== | ||
| + | This feature lets you create multiple translated versions of a site on one domain. See the FAQ [[New Rotation Hints]] section "Site menu translation (i18)" for interface translation. Here we'll cover translating content. | ||
| - | It' | + | Start by creating additional languages in Rotation - Settings - Multilingual. Then, when editing galleries, you can provide a description for each language. For automatic translation, |
| - | First of all, open Rotation Settings, | + | Switch |
| - | Since this moment you'll ba able t edit descriptions for each gallery in each language. And you can see each gallery | + | **There are 2 ways to display the correct |
| - | An easy way to create links is to have following lines in you .htaccess | + | 1. Auto Switch language - the URL stays the same, but the page language changes based on browser language |
| + | |||
| + | 2. Auto redirect | ||
| + | |||
| + | |||
| + | **Auto Switch language** | ||
| + | |||
| + | The script reads the browser' | ||
| + | |||
| + | **Auto redirect to existing language** | ||
| + | |||
| + | This option redirects users to a language-specific URL. The default pattern is: | ||
| + | |||
| + | http:// | ||
| + | |||
| + | For example, a request to http:// | ||
| + | |||
| + | To enable this, add the default rewrite rule at the start of .htaccess: | ||
| < | < | ||
| Line 18: | Line 35: | ||
| </ | </ | ||
| - | and links like http:// | + | Of course, you can create your own URL patterns. |
| - | but feel free to modify links and rewrite in anyway. | ||
| + | **Subdomains** | ||
| - | ====== Categories | + | If you use language subdomains (de.domain.com, |
| - | You can edit language data for each category and galleries. | + | < |
| - | Note, that you have some options here: you can have just translations, | + | |
| - | ====== Site Internationalization | + | RewriteCond %{HTTP_HOST} ^([a-z]{2})\.domain\.com$ [NC] |
| + | RewriteRule ^ %{REQUEST_URI}? | ||
| - | If you also want to translate site's menu you can do the following | + | </ |
| - | 1. create custom template , let's say languages | ||
| - | < | ||
| - | <? | ||
| - | $my_keywords[' | ||
| - | ' | ||
| - | ' | ||
| - | and so on | ||
| - | ); | ||
| - | $my_keywords[' | + | Each language can maintain statistics separately via two options: Own category stats and Own thumb stats. |
| - | ' | + | |
| - | ' | + | |
| - | | + | |
| - | ); | + | |
| - | and so on as many languages as you want | + | If both are disabled, |
| + | **Own category stats** - When enabled, category thumbnails are sorted by click stats for that specific language. For example, clicks on http:// | ||
| + | **Own thumb stats** - Gallery thumbnails get separate statistics per language. The system creates an additional set of category thumbnails to ensure category headers appear first. If you enable this without Own category stats, the category thumbnail may differ from other top thumbnails in that category. | ||
| - | if ($_GET[' | + | ===== Auto Switch language ===== |
| - | $lang = $my_keywords[$_GET[' | + | |
| - | } else $lang = $my_keywords[$_GET[' | + | |
| - | That's it. | + | This option displays the translation on the same URL. |
| - | As you can see here if you have & | + | |
| - | </ | + | |
| - | 2. In each template, where you need any translations add | + | When a user with DE language (if configured) visits the site, the page automatically displays in DE without changing the URL. |
| - | < | + | To clarify: **Auto redirect to existing language** |
| - | <!--INCLUDE_TEMPLATE_languages--> | + | **Auto Switch language** |
| - | </ | + | |
| + | ===== Save language preferences ===== | ||
| - | 3. in templates replace actual phrases with variables | + | Saves the user's language preference |
| - | < | + | |
| - | Most popular | + | To redirect users to the **main language** (ignoring their saved cookie), use **& |
| - | Order By Date => <?=$lang['order_by_date' | + | |
| - | and so on | + | |
| - | </ | + | ===== GeoIP Based ===== |
| + | |||
| + | Beyond browser language, you can rotate by country using GeoIP. | ||
| + | |||
| + | Create a language like FR (you don't need translations, | ||
| + | |||
| + | This setting takes priority. For example, if you have FR and DE languages, a user with browser language DE but an IP from Belgium will be counted as FR, not DE. | ||
| + | |||
| + | This lets you group countries together. | ||
| - | So at this point you should see translations if you open let's say index page as http:// | + | Don't create separate rotations for every language unless necessary—you'll need to manage rotations separately for each group, and you need sufficient traffic to justify it. |
| + | ===== Translations ===== | ||
| + | Translating the site menu (links like "Most Popular", | ||
| + | Go to Rotation - CMS Templates - Tpl Custom Var and add custom variables like most_popular. Use these in templates as < | ||
multilingual_sites.1519548862.txt.gz · Last modified: by 127.0.0.1
