User Tools

Site Tools


multilingual_sites

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
multilingual_sites [2024/09/13 17:53] adminmultilingual_sites [2026/03/21 10:11] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Multilingual Sites ====== ====== Multilingual Sites ======
  
-The purpose of this feature is to create multiple language versions of a site on a single domain. Instructions on how to translate the site’s interface are outlined in the FAQ [[New Rotation Hints]], under the section "Translating the site menu (i18n)." In this section, we will focus on translating the actual content.+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 translationHere we'll cover translating content.
  
-First, navigate to Rotation - Settings - Multilingual to create the required number of languagesOnce this is doneeach gallery will include the option to edit its description for each language. However, in most cases, automatic translation will be enough+Start by creating additional languages in Rotation - Settings - Multilingual. Thenwhen editing galleries, you can provide a description for each language. For automatic translation, use [[Google translate]]. Let's say you've added German (de) and Spanish (es) to your English (en) site.
  
-You can use [[Google Translate]]. Let’s assume you have added two languagesde and es, for the main site, which is in English.+Switch languages by adding &force_lng=... to the URL (de or es in this example).
  
-The language is switched by adding &force_lng=... (e.g., de or es in our example) to the URL.+**There are 2 ways to display the correct language** via 2 options in Rotation - Settings - Multilingual:
  
-There are two options for displaying the preferred language, and consequently, two options in Rotation Settings - Multilingual:+1. Auto Switch language - the URL stays the same, but the page language changes based on browser language
  
-When the page URL does not change but varies depending on the browser's language settings — **Auto Switch language.** +2. Auto redirect to existing language the URL changes, and the language is always fixed for that URL regardless of browser settings
-When the page URL changes, displaying the page in a specific language regardless of the browser’s language — **Auto redirect to existing language.**+
  
-===== Auto Switch language ===== 
  
 +**Auto Switch language**
  
-The script detects the language specified in the browser's headers and displays the page accordingly, without changing the URL. This option is straightforward: once enabled, the same page is displayed in different languages based on the browser’s language settings.+The script reads the browser'language preference from HTTP headers and displays the page in that language. The URL doesn't changeSimply enable this option to show the same page in different languages based on browser settings.
  
-===== Auto redirect to existing language =====+**Auto redirect to existing language**
  
 +This option redirects users to a language-specific URL. The default pattern is:
  
-The Auto redirect to existing language option redirects the user to a language-specific URL. The default format is:+  http://{DOMAIN}/{LANGUAGE}/{ORIGINAL_REQUEST}
  
-http://{DOMAIN}/{LANGUAGE}/{ORIGINAL_REQUEST}+For example, a request to http://domain/category/asd/ with language set to ru will redirect to http://domain/ru/category/asd/ (assuming ru is configured). Pages accessed via http://domain/ru/category/asd/ are always in Russian, regardless of browser language.
  
-For exampleif a request is made to http://domain/category/asd/ with the language set to ru, the user will be redirected to http://domain/ru/category/asd/ (assuming ru is configured in the settings)The URL http://domain/ru/category/asd/ will always display the page in Russian, regardless of the browser's language.+To enable thisadd the default rewrite rule at the start of .htaccess:
  
-To enable these rewrites, a default rewrite rule must be added to the beginning of the .htaccess file:+<code> 
 +RewriteBase / 
 +RewriteCond %{REQUEST_FILENAME} !-f 
 +RewriteCond %{REQUEST_FILENAME} !-d 
 +RewriteRule ^([^/]{2})/(.*)$ $2?force_lng=$1&%{QUERY_STRING} [L] 
 +</code>
  
-<code> RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]{2})/(.*)$ $2?force_lng=$1&%{QUERY_STRING} [L] </code> +Of course, you can create your own URL patterns.
-Of course, you can create your own version to accommodate different link variations.+
  
-For each language, there are several options for collecting statistics, mainly differing in two parameters: Own category stats and Own thumb stats. 
  
-If both Own category stats and Own thumb stats are disabled, you essentially get a simple translation of the site. This approach is beneficial for SEO.+**Subdomains**
  
-Own category stats — when set to "yes," this means that when category thumbnails are displayed and sorted by clicks, they will be shown based on the click statistics for that specific language pageFor instanceclicks on category thumbnails on http://domain/ and http://domain/de/ will be counted separatelyWhile this example may not be entirely relevant for deit is particularly useful when comparing categories on sites in jp and enwhere the sorting and popularity of categories can differ significantly.+If you use language subdomains (de.domain.comfr.domain.cometc.)point them all to the main domain in your Apache config and add this rewrite:
  
-Own thumb stats — this means that gallery thumbnails will have their own independent statistics. Please note that in this case, an additional set of category thumbnails is created, ensuring that the category thumbnails are positioned prominently within their respective categories. If this option is enabled without enabling Own category stats, the category thumbnail order may differ from the first thumbnails shown in that category.+<code> 
 + 
 +RewriteCond %{HTTP_HOST} ^([a-z]{2})\.domain\.com$ [NC] 
 +RewriteRule ^ %{REQUEST_URI}?force_lng=%1 [QSA,L] 
 + 
 +</code> 
 + 
 + 
 +Each language can maintain statistics separately via two options: Own category stats and Own thumb stats
 + 
 +If both are disabled, you get a simple translation. This is good for SEO. 
 + 
 +**Own category stats** - When enabled, category thumbnails are sorted by click stats for that specific language. For example, clicks on http://domain/ and http://domain/de/ are counted separately. This is useful when comparing languages with different user preferences (e.g., jp vs en may have very different category popularity). 
 + 
 +**Own thumb stats** - Gallery thumbnails get separate statistics per languageThe 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.
  
 ===== Auto Switch language ===== ===== Auto Switch language =====
  
-There is a second option for displaying translations—on the same URL.+This option displays the translation on the same URL.
  
-For example, if a user with the DE language setting (and the DE language is available on your site) visits the site, the page will automatically display in DE without changing the URL (i.e., without a redirect).+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 is a redirect to a URL where the language is visible in the URL. Auto Switch language displays the page in the selected language without a redirect, and the language is not visible in the URL.+To clarify: **Auto redirect to existing language** - redirects to a language-specific URL (language visible in the URL). 
 +**Auto Switch language** - displays the correct language without redirecting (language not visible in the URL).
  
 ===== Save language preferences ===== ===== Save language preferences =====
  
-This option saves the users language preference in a cookie. It is only applicable to the Auto Switch language option.+Saves the user's language preference in a cookie. Only relevant for **Auto Switch language**.
  
-If you need to redirect the user to the default languageignoring the language saved in the cookie—you should use &force_lng=main in the URL.+To redirect users to the **main language** (ignoring their saved cookie), use **&force_lng=main**.
  
-===== GeoIP-Based Language Detection ===== 
  
-The basic language detection method is based on the browser’s language settings. However, it is also possible to configure it based on the user’s country (using GeoIP).+===== GeoIP Based =====
  
-To do this, create a language, such as FR. While translating the content is optional, enabling Own thumb stats is required since we will create separate statistics for French traffic. Next, configure the GeoIP settings by specifying that if a user's IP address is detected as being from France (or Belgium, for example), the system will count the impressions, clicks, and click-through rate (CTR) for the FR language. This can be done by entering the GeoIP codes (such as FR, BE) in the "+ GeoIP Codes" field of the newly created language.+Beyond browser language, you can rotate by country using GeoIP.
  
-Please note that this setting takes priority. For instance, if you have both FR and DE languages configured, but a user with the DE language setting visits from a Belgian IP address, the statistics will be recorded under FR, not DE.+Create a language like FR (you don't need translations, but Own thumb stats is required for separate rotation stats). Then decide that traffic from France (and Belgium, for example) should be counted as FR. In the language settingsadd GeoIP codes in the "+ GeoIP Codes" field: FR,BE.
  
-This approach allows you to group countries together for language statistics.+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
 + 
 +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.
  
-However, be cautious about creating separate rotations for each language. You will need to rotate the database for each group separately, and it's essential to assess whether you have sufficient traffic to support this. 
  
 ===== Translations ===== ===== Translations =====
  
-It is fairly simple to translate the site’s menu (e.g., the links like "Most Popular,"Order By date," etc.) into other languages.+Translating the site menu (links like "Most Popular", "Order By Date"etc.) is straightforward. 
 + 
 +Go to Rotation - CMS Templates - Tpl Custom Var and add custom variables like most_popular. Use these in templates as <!--CUSTOM_VAR_MOST_POPULAR-->. You can set a different translation for each language. 
  
-In Rotation - CMS Templates - Tpl Custom Var, add custom variables such as most_popular. This variable can then be used in templates like <!--CUSTOM_VAR_MOST_POPULAR-->, and a separate translation can be provided for each language. 
multilingual_sites.1726250026.txt.gz · Last modified: by admin