3

Product support

Visit this product's website for support.

Categories

Selecting a Language

Different languages can be set up in the admin panel using the Settings → Sites area. Each site should use a different locale to be considered a language.

The visitor can select a language by prefixing the language code to the URL or using a dedicated hostname. For example:

  • http://website.tld/ will display the site in the default language
  • http://website.tld/ru/ will display the site in Russian
  • http://website.tld/fr/ will display the site in French
The following plugins extend or depend on the plugin
Real Estate
Free

Real Estate

Buying and selling real estate

588 installations
# 323 in Free of all time.
Free

Real Estate

Buying and selling real estate

EditMe
Free

EditMe

In-context frontend text translator and editor

855 installations
# 508 in Free of all time.
Free

EditMe

In-context frontend text translator and editor

Extend translate plugin
Free

Extend translate plugin

Helper for RainLab.Translate plugin

11,247 installations
# 110 in Free of all time.
Free

Extend translate plugin

Helper for RainLab.Translate plugin

Translate Tabs
Free

Translate Tabs

Edit translatable backend form fields and theme options grouped into tabs by locales

1,656 installations
# 285 in Free of all time.
Free

Translate Tabs

Edit translatable backend form fields and theme options grouped into tabs by locales

Slides
$7

Slides

This plugin allows you to manage sliders and headers.

14 projects
# 177 in Paid of all time.
$7

Slides

This plugin allows you to manage sliders and headers.

Blog Time to Read
Free

Blog Time to Read

A simple time to read extension for RainLab Blog plugin

1,256 installations
# 214 in Free of all time.
Free

Blog Time to Read

A simple time to read extension for RainLab Blog plugin

Room Booking Pro
$100

Room Booking Pro

The best Room Booking plugin for October CMS (accept online payments & synchronise bookings)

37 projects
# 90 in Paid of all time.
$100

Room Booking Pro

The best Room Booking plugin for October CMS (accept online payments & synchronise bookings)

CRM Pro
$50

CRM Pro

The professional Customer Relations Manager (CRM) for October

35 projects
# 112 in Paid of all time.
$50

CRM Pro

The professional Customer Relations Manager (CRM) for October

Mall
Free

Mall

E-commerce shop solution for October CMS

10,686 installations
# 43 in Free of all time.
Free

Mall

E-commerce shop solution for October CMS

Multi-lingual SEO & Sitemap
Free

Multi-lingual SEO & Sitemap

Multi-lingual SEO & Sitemap plugin. It supports CMS Pages, Static Pages and custom models.

6,399 installations
# 28 in Free of all time.
Free

Multi-lingual SEO & Sitemap

Multi-lingual SEO & Sitemap plugin. It supports CMS Pages, Static Pages and custom models.

Campaignr
Free

Campaignr

Create and manage events, workshops, calls to action and campaigns.

1,214 installations
# 270 in Free of all time.
Free

Campaignr

Create and manage events, workshops, calls to action and campaigns.

Guestbook
Free

Guestbook

Guestbook for your website with Markdown syntax and smiles.

109 installations
# 666 in Free of all time.
Free

Guestbook

Guestbook for your website with Markdown syntax and smiles.

Footer Signature
Free

Footer Signature

Customize the footer with your signature!

626 installations
# 365 in Free of all time.
Free

Footer Signature

Customize the footer with your signature!

User Connect
Free

User Connect

Creating and manage email subscription lists with ease.

470 installations
# 355 in Free of all time.
Free

User Connect

Creating and manage email subscription lists with ease.

Table of content
Free

Table of content

Create Table of content (Tabular list) of Headings(H's) out of all pages/content

255 installations
# 271 in Free of all time.
Free

Table of content

Create Table of content (Tabular list) of Headings(H's) out of all pages/content

Age Gate
Free

Age Gate

Age Gate plugin to enable simple age checking popup on OctoberCMS site

58 installations
# 681 in Free of all time.
Free

Age Gate

Age Gate plugin to enable simple age checking popup on OctoberCMS site

Cockpit CRM
$34.99

Cockpit CRM

Simple, yet powerfull Customer Relationship Management

5 projects
# 156 in Paid of all time.
$34.99

Cockpit CRM

Simple, yet powerfull Customer Relationship Management

Careers
$10

Careers

Posting Job for your organization made simple.

37 projects
# 58 in Paid of all time.
$10

Careers

Posting Job for your organization made simple.

Helpdesk
$20

Helpdesk

An issue tracking system built to assist your customer support team

20 projects
# 88 in Paid of all time.
$20

Helpdesk

An issue tracking system built to assist your customer support team

Let's rent
$25

Let's rent

The core component for building a rental database

3 projects
# 113 in Paid of all time.
$25

Let's rent

The core component for building a rental database

Let's rent cars
$20

Let's rent cars

The perfect solution for any car rental business

3 projects
# 102 in Paid of all time.
$20

Let's rent cars

The perfect solution for any car rental business

Mail Translatable
Free

Mail Translatable

Multilingual mail templates stored in the database

442 installations
# 494 in Free of all time.
Free

Mail Translatable

Multilingual mail templates stored in the database

Dates & Currencies Localize
Free

Dates & Currencies Localize

Allows to create different formats to display dates and currencies. The formats can be used on the themes or o...

553 installations
# 207 in Free of all time.
Free

Dates & Currencies Localize

Allows to create different formats to display dates and currencies. The formats can be used on the themes or o...

Job Portal
$10

Job Portal

Create your very own job portal and connect employers and talents

4 projects
# 162 in Paid of all time.
$10

Job Portal

Create your very own job portal and connect employers and talents

Posts
Free

Posts

Posts publishing platform for October CMS with SEO (plus Schema.org), automatic redirect, multi-type body and...

86 installations
# 293 in Free of all time.
Free

Posts

Posts publishing platform for October CMS with SEO (plus Schema.org), automatic redirect, multi-type body and...

Localized static menu
Free

Localized static menu

Provides a localized static menu.

61 installations
# 476 in Free of all time.
Free

Localized static menu

Provides a localized static menu.

Fallback Locale
Free

Fallback Locale

Provides a fallback locale.

21 installations
# 751 in Free of all time.
Free

Fallback Locale

Provides a fallback locale.

easyRechtssicher Plugin
Free

easyRechtssicher Plugin

Allows the inclusion of imprint and privacy policy via Easy Rechtssicher API

59 installations
# 644 in Free of all time.
Free

easyRechtssicher Plugin

Allows the inclusion of imprint and privacy policy via Easy Rechtssicher API

Epigtor
Free

Epigtor

In-context content editor plugin

147 installations
# 363 in Free of all time.
Free

Epigtor

In-context content editor plugin

Cookie consent
Free

Cookie consent

October CMS plugin for cookie consent by Jagu

346 installations
# 98 in Free of all time.
Free

Cookie consent

October CMS plugin for cookie consent by Jagu

Events
Free

Events

Just a simple Events publishing system for October CMS

45 installations
# 116 in Free of all time.
Free

Events

Just a simple Events publishing system for October CMS

Moonamick
$19

Moonamick

Manage all the content of your website in a simple and powerfull way

8 projects
# 224 in Paid of all time.
$19

Moonamick

Manage all the content of your website in a simple and powerfull way

Contact Form
Free

Contact Form

Just a simple Contact Form plugin for October CMS

62 installations
# 96 in Free of all time.
Free

Contact Form

Just a simple Contact Form plugin for October CMS

All in One Accessibility™
Free

All in One Accessibility™

Quick Web Accessibility Implementation with All In One Accessibility!

79 installations
# 84 in Free of all time.
Free

All in One Accessibility™

Quick Web Accessibility Implementation with All In One Accessibility!

Translate Automator
Free

Translate Automator

Improves Rainlab Translate by automating the translation of untranslated strings using Google Translate.

26 installations
# 140 in Free of all time.
Free

Translate Automator

Improves Rainlab Translate by automating the translation of untranslated strings using Google Translate.

The following themes use this plugin
Free

Bonjour

5,008 installations
# 28 in Free of all time.
Free

Bonjour

A sample multi-lingual theme for translated content.

$10

Vega Pro

95 projects
# 8 in Paid of all time.
$10

Vega Pro

One page theme with Blog, Pages, Translations, Contact form and more

$6.99

Starter

17 projects
# 24 in Paid of all time.
$6.99

Starter

A Starter Theme for October based on MaterializeCSS.

$37.99

Multipurpose Theme with PAGE BUILDER - Success

311 projects
# 1 in Paid of all time.
$37.99

Multipurpose Theme with PAGE BUILDER - Success

Octobercms Multipurpose Theme with easy Page Builder system

$50

TechMarket

34 projects
# 12 in Paid of all time.
$50

TechMarket

Modern, responsive and highly customizable eCommerce OctoberCMS theme based on Shopaholic eCommerce Plugin Ecosystem

$59

Modular Theme with PAGE BUILDER - Clear

297 projects
# 2 in Paid of all time.
$59

Modular Theme with PAGE BUILDER - Clear

Octobercms Multipurpose Theme with Powerful Settings and an easy CRUD Generator - Page Builder system

$59

Identity - Creative Personal & Agency Theme

31 projects
# 9 in Paid of all time.
$59

Identity - Creative Personal & Agency Theme

Creative Personal - Multipurpose Octobercms Theme

Free

Start Bootstrap - Resume

318 installations
# 109 in Free of all time.
Free

Start Bootstrap - Resume

Resume is a resume and CV theme for Bootstrap created by Start Bootstrap.

Free

Room Booking

146 installations
# 112 in Free of all time.
Free

Room Booking

Sample theme for Room Booking Pro plugin.

$29.99

Argon

17 projects
# 21 in Paid of all time.
$29.99

Argon

A beautiful theme based on CreativeTim Argon. Comes with a simple page builder and custom blocks that extends Argon Design System.

Free

Mall Demo Theme

4,311 installations
# 4 in Free of all time.
Free

Mall Demo Theme

Official starter theme for the Mall e-commerce plugin

$19.99

PAGE BUILDER - Modular Theme

12 projects
# 28 in Paid of all time.
$19.99

PAGE BUILDER - Modular Theme

Convenient page builder with 50+ blocks

Free

Bootstart

394 installations
# 80 in Free of all time.
Free

Bootstart

A simple and clean Bootstrap-based theme for OctoberCMS to start your new project!

Free

MaterialKit

6 installations
# 153 in Free of all time.
Free

MaterialKit

A beautiful theme based on CreativeTim MaterialKit. Comes with a PageBuilder in StaticPages.

$5

Cleasi

23 projects
# 16 in Paid of all time.
$5

Cleasi

A clean theme for portfolio / company presentation sites and blogs with e-commerce support (Shopaholic).

$10

Mercurius

2 projects
# 50 in Paid of all time.
$10

Mercurius

Jagu Mercurius October CMS frontend theme

$69

eMarket - Advanced E-Commerce Octobercms theme

30 projects
# 7 in Paid of all time.
$69

eMarket - Advanced E-Commerce Octobercms theme

Premium Ecommerce Octobercms theme based on OFFLINE Mall Plugin

$5

Visarzo

104 projects
# 34 in Paid of all time.
$5

Visarzo

Visarzo is a powerful CSS Framework coupled with the best of Bootstrap. Block design, free arrangement and combination, easy to use and customize.

$16

Levo

0 projects
# 63 in Paid of all time.
$16

Levo

Theme specially designed for tutoring/teaching bussines

Free

Posts Demo

32 installations
# 145 in Free of all time.
Free

Posts Demo

Demo theme for Dynamedia Posts plugin

Free

Bootstrap 5 Mall Starter

262 installations
# 68 in Free of all time.
Free

Bootstrap 5 Mall Starter

Unofficial Bootstrap 5 starter theme for the Mall e-commerce plugin, based on the original Mall Starter theme

$79

Presence - Multipurpose Theme with Powerful Pagebuilder

6 projects
# 23 in Paid of all time.
$79

Presence - Multipurpose Theme with Powerful Pagebuilder

An Excellent Octobercms Theme with Advanced Page Builder & Powerful Theme settings

Free

NewsHub - now with PageBuilder

232 installations
# 20 in Free of all time.
Free

NewsHub - now with PageBuilder

A simple, responsive light and dark blog / magazine template, designed with Bootstrap 5.2 and extended with an own PageBuilder system.

$59

Architect - Octobercms Theme with Advanced Pagebuilder

6 projects
# 10 in Paid of all time.
$59

Architect - Octobercms Theme with Advanced Pagebuilder

An Powerful Octobercms Theme with Page Builder & Extensive Theme settings

Installation

To install using October CMS v3.1 or above:

php artisan plugin:install rainlab.translate

To install using October CMS v3.0 and below:

php artisan plugin:install rainlab.translate --want="^1.0"

Upgrading from v1 to v2

If you are upgrading from version 1 of this plugin, view the upgrade guide.

Language Picker Component

A visitor can select their chosen language using the native SitePicker component that is included in the October CMS core. This component will display a simple dropdown that changes the page language depending on the selection.

title = "Home"
url = "/"

[sitePicker]
==

<h3>{{ 'Please select your language:'|_ }}</h3>
<select class="form-control" onchange="window.location.assign(this.value)">
    {% for site in sitePicker.sites %}
        <option value="{{ site.url }}" {{ this.site.code == site.code ? 'selected' }}>{{ site.name }}</option>
    {% endfor %}
</select>

If translated, the text above will appear as whatever language is selected by the user. The dropdown is very basic and is intended to be restyled. A simpler example might be:

<p>
    Switch language to:

    {% for site in sitePicker.sites %}
        <a href="{{ site.url }}">{{ site.name }}</a>
    {% endfor %}
</p>

Message Translation

Message or string translation is the conversion of adhoc strings used throughout the site. A message can be translated with parameters.

{{ 'site.name'|_ }}

{{ 'Welcome to our website!'|_ }}

{{ 'Hello :name!'|_({ name: 'Friend' }) }}

A message can also be translated for a choice usage.

{{ 'There are no apples|There are :number applies!'|__(2, { number: 'two' }) }}

Or you set a locale manually by passing a second argument.

{{ 'this is always english'|_({}, 'en') }}

Themes can provide default values for these messages by defining a translate key in the theme.yaml file, located in the theme directory.

name: My Theme
# [...]

translate:
    en:
        site.name: 'My Website'
        nav.home: 'Home'
        nav.video: 'Video'
        title.home: 'Welcome Home'
        title.video: 'Screencast Video'

You may also define the translations in a separate file, where the path is relative to the theme. The following definition will source the default messages from the file config/lang.yaml inside the theme.

name: My Theme
# [...]

translate: config/lang.yaml

This is an example of config/lang.yaml file with two languages:

en:
    site.name: 'My Website'
    nav.home: 'Home'
    nav.video: 'Video'
    title.home: 'Welcome Home'
hr:
    site.name: 'Moje web stranice'
    nav.home: 'Početna'
    nav.video: 'Video'
    title.home: 'Dobrodošli'

You may also define the translations in a separate file per locale, where the path is relative to the theme. The following definition will source the default messages from the file config/lang-en.yaml inside the theme for the english locale and from the file config/lang-fr.yaml for the french locale.

name: My Theme
# [...]

translate:
    en: config/lang-en.yaml
    fr: config/lang-fr.yaml

This is an example for the config/lang-en.yaml file:

site.name: 'My Website'
nav.home: 'Home'
nav.video: 'Video'
title.home: 'Welcome Home'

In order to make these default values reflected to your frontend site, go to Settings -> Translate messages in the backend and hit Scan for messages. They will also be loaded automatically when the theme is activated.

The same operation can be performed with the translate:scan artisan command. It may be worth including it in a deployment script to automatically fetch updated messages:

php artisan translate:scan

Add the --purge option to clear old messages first:

php artisan translate:scan --purge

Content & Mail Template Translation

This plugin activates a feature in the CMS that allows content & mail template files to use language suffixes, for example:

  • welcome.htm will contain the content or mail template in the default language.
  • welcome.ru.htm will contain the content or mail template in Russian.
  • welcome.fr.htm will contain the content or mail template in French.

Model Translation

Models can have their attributes translated by using the RainLab\Translate\Behaviors\TranslatableModel behavior and specifying which attributes to translate in the class.

class User
{
    public $implement = [
        \RainLab\Translate\Behaviors\TranslatableModel::class
    ];

    public $translatable = ['name'];
}

The attribute will then contain the default language value and other language code values can be created by using the translateContext() method.

$user = User::first();

// Outputs the name in the default language
echo $user->name;

$user->translateContext('fr');

// Outputs the name in French
echo $user->name;

You may use the same process for setting values.

$user = User::first();

// Sets the name in the default language
$user->name = 'English';

$user->translateContext('fr');

// Sets the name in French
$user->name = 'Anglais';

The lang() method is a shorthand version of translateContext() and is also chainable.

// Outputs the name in French
echo $user->lang('fr')->name;

This can be useful inside a Twig template.

{{ user.lang('fr').name }}

There are ways to get and set attributes without changing the context.

// Gets a single translated attribute for a language
$user->getAttributeTranslated('name', 'fr');

// Sets a single translated attribute for a language
$user->setAttributeTranslated('name', 'Jean-Claude', 'fr');

Theme Data Translation

It is also possible to translate theme customisation options. Just mark your form fields with translatable property and the plugin will take care about everything else:

tabs:
    fields:
        website_name:
            tab: Info
            label: Website Name
            type: text
            default: Your website name
            translatable: true

Fallback Attribute Values

By default, untranslated attributes will fall back to the default locale. This behavior can be disabled by calling the noFallbackLocale method.

$user = User::first();

$user->noFallbackLocale()->lang('fr');

// Returns NULL if there is no French translation
$user->name;

Indexed Attributes

Translatable model attributes can also be declared as an index by passing the $transatable attribute value as an array. The first value is the attribute name, the other values represent options, in this case setting the option index to true.

public $translatable = [
    'name',
    ['slug', 'index' => true]
];

Once an attribute is indexed, you may use the transWhere method to apply a basic query to the model.

Post::transWhere('slug', 'hello-world')->first();

The transWhere method accepts a third argument to explicitly pass a locale value, otherwise it will be detected from the environment.

Post::transWhere('slug', 'hello-world', 'en')->first();

URL Translation

Pages in the CMS support translating the URL property. Assuming you have 3 languages set up:

  • en: English
  • fr: French
  • ru: Russian

There is a page with the following content:

url = "/contact"

[viewBag]
localeUrl[ru] = "/контакт"
==
<p>Page content</p>

The word "Contact" in French is the same so a translated URL is not given, or needed. If the page has no URL override specified, then the default URL will be used. Pages will not be duplicated for a given language.

  • /fr/contact - Page in French
  • /en/contact - Page in English
  • /ru/контакт - Page in Russian
  • /ru/contact - 404

Translating URLs in Twig

The localeUrl method will replace the route prefix on a URL from one locale to another. For example, converting the current request URL from en to de.

{{ this.request.url|localeUrl('de') }}

The localePage will return a translated URL for a CMS page. It takes a locale (first argument) and page parameters (second argument).

{{ 'blog/post'|localePage('de', { slug: 'foobar' }) }}

URL Parameter Translation

It's possible to translate URL parameters by listening to the cms.sitePicker.overrideParams event, which is fired when discovering language URLs.

Event::listen('cms.sitePicker.overrideParams', function($page, $params, $oldSite, $newSite) {
    if ($page->baseFileName == 'your-page-filename') {
        return MyModel::translateParams($params, $oldSite->hard_locale, $newSite->hard_locale);
    }
});

In MyModel, one possible implementation might look like this:

public static function translateParams($params, $oldLocale, $newLocale)
{
    $newParams = $params;
    foreach ($params as $paramName => $paramValue) {
        $records = self::transWhere($paramName, $paramValue, $oldLocale)->first();
        if ($records) {
            $records->translateContext($newLocale);
            $newParams[$paramName] = $records->$paramName;
        }
    }
    return $newParams;
}

Query String Translation

It's possible to translate query string parameters by listening to the cms.sitePicker.overrideQuery event, which is fired when switching languages.

Event::listen('cms.sitePicker.overrideQuery', function($page, $params, $oldSite, $newSite) {
    if ($page->baseFileName == 'your-page-filename') {
        return MyModel::translateParams($params, $oldSite->hard_locale, $newSite->hard_locale);
    }
});

For a possible implementation of the MyModel::translateParams method look at the example under URL parameter translation from above.

Extend Theme Scan

Event::listen('rainlab.translate.themeScanner.afterScan', function (ThemeScanner $scanner) {
    // ...
});

Settings Model Translation

It's possible to translate your settings model like any other model. To retrieve translated values use:

Settings::instance()->getAttributeTranslated('your_attribute_name');

Conditionally Extending Plugins

Models

It is possible to conditionally extend a plugin's models to support translation by placing an @ symbol before the behavior definition. This is a soft implement will only use TranslatableModel if the Translate plugin is installed, otherwise it will not cause any errors.

/**
 * Post Model for the blog
 */
class Post extends Model
{
    // [...]

    /**
     * @var array implement the TranslatableModel behavior softly.
     */
    public $implement = ['@'.\RainLab\Translate\Behaviors\TranslatableModel::class];

    /**
     * @var array translatable attributes, if available.
     */
    public $translatable = ['title'];

    // [...]
}

The back-end forms will automatically detect the presence of translatable fields and replace their controls for multilingual equivalents.

User Interface

Switching Locales

Users can switch between locales by clicking on the site selection menu in the backend panel. This will add a _site_id query value to the URL, allowing for multiple browser tabs to be used.

  • Found the plugin not useful on 14 Nov, 2023

    Only the translations for twig work in October cms v3. I am unable to use the url translations or model translations.

  • Found the plugin not useful on 20 Jul, 2023

    How we can implement the the same approach on v2 that changing the langunage will not be base on slug url ?

  • Found the plugin not useful on 8 Apr, 2023

    In my opinion the use of this plugin (we used it in the V1 and 2 of October CMS) is a big mess now. How can we translate the SEO atributes..the Menu names and so on? In the previous version there were some drop downs right to every Input typte text and Rich text editor..now we have to chage the language from (Manage sites) top right..and recreate the pages over and over again for each language.

    Instead of going forward and make it easyer..you went back and made it harder to use..more time consuming and useless.

    Sorry for this..but you messed this up bad times :(

  • Found the plugin useful on 6 Nov, 2022

    Great plugin! Thanks for that.

    And for those who complain about not working to translate strings that contains HTML (like links in a phrase) i found an workaround. Maybe will help someone.

    Here's an example:

    {% set link_1 %}
        <a href="{{ 'my-page-one'|page }}" target="_blank">{{ 'Link label one'|_ }}</a>
    {% endset %}
    
    {% set link_2 %}
        <a href="{{ 'my-page-two'|page }}" target="_blank">{{ 'Link label two'|_ }}</a>
    {% endset %}
    
    {{ ('Click here %s1 to see the first page or click here %s2 to see the second page.'|_)|replace({ '%s1': link_1|raw, '%s2': link_2|raw })|raw }}

    Good luck!

  • Found the plugin not useful on 29 Aug, 2021

    I get very unexpected output when using it. The docs aren't very helpful. I spent hours on trial and error. IMHO this plugin is useless!

  • Found the plugin useful on 24 Aug, 2021

    Nice, but for some time can't handle html tags in parameters :(

  • Found the plugin useful on 14 Nov, 2020

    Is there a way to add flags to the locale language switcher, next to the language name ?

  • Found the plugin useful on 13 Aug, 2020

    i want to limit my posts with current language or choose two thumbnail pic for my posts in newsletter plugin or portfolio for example i want to show different posts with different language HELP ME PLZ...

  • Found the plugin not useful on 28 Jun, 2020

    The plugin does not run validation for translatable fields, only validate the primary language, all other language inputs are ignored. It's a shame, that's why I can't use it.

  • Found the plugin useful on 2 Jun, 2020

    Отличный плагин! Спасибо разработчикам!

  • Found the plugin useful on 17 Apr, 2020

    It helps a lot with my projects. All of them are at least two languages.

  • Found the plugin useful on 27 Mar, 2020

    1: Select Force URL schema, Google Cloud does not enable load balancing, and everything works fine on the website.

    2: Force URL schema is not selected, Google Cloud starts load balancing, and everything works fine on the website.

    3: Select Force URL schema, Google Cloud starts load balancing, and the server returns a 502 error.

    Please guys help answer it, thank you

  • Found the plugin useful on 29 Dec, 2019

    How can I get {% page %} with rendered snippets as string? I need a lot of replacements in markup, but I able only call tag or not compiled data from $this->page.

  • Found the plugin useful on 28 Nov, 2019

    It would be cool if you could hide non translated content... Not every page has all content translated :(

  • Found the plugin useful on 10 Dec, 2018

    Brilliant Plugin thank you!

  • Found the plugin useful on 29 Nov, 2018

    Super

  • Found the plugin useful on 14 Aug, 2018

    Manage cities for your app, countries with their cities coming soon

  • Found the plugin useful on 26 Mar, 2018

    Hi guys, menu titles do not change. How can I fix this? The menu does not change when I change the language. I am creating a static page.@RainLab Help Please

  • Found the plugin useful on 17 Dec, 2017

    I use this plugin and plugin news , but I do not want the slug in the post as multi-language. I want the slug to be fixed. How do I do ? I have a suggestion that, when changing the language at a certain position, all languages in the other position will change. For example: I clicked change language from English to English in the title textbox, the other positions (such as content, summary, ...) are automatically selected in English.

    And... This is great plugin ! Thanks

  • Found the plugin not useful on 23 Oct, 2017

    This plugin broke my whole site ...

    BadMethodCallException in CmsObjectQuery.php line 128: Call to undefined method Cms\Classes\CmsObjectQuery::extend() in CmsObjectQuery.php line 128 at CmsObjectQuery->call('extend', array(object(Closure))) at call_user_func_array(array(object(CmsObjectQuery), 'extend'), array(object(Closure))) in CmsObject.php line 555 at CmsObject->__call('extend', array(object(Closure))) at call_user_func_array(array(object(Page), 'extend'), array(object(Closure))) in CmsObject.php line 571 at CmsObject::callStatic('extend', array(object(Closure))) in Plugin.php line 47 at Plugin->register() in PluginManager.php line 185 at PluginManager->registerPlugin(object(Plugin), 'RainLab.Translate') in PluginManager.php line 151 at PluginManager->registerAll() in ServiceProvider.php line 46 at ServiceProvider->register() in Application.php line 494 at Application->register(object(ServiceProvider)) in ProviderRepository.php line 75 at ProviderRepository->load(array('Illuminate\Bus\BusServiceProvider', 'Illuminate\Cache\CacheServiceProvider', 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider', 'Illuminate\Routing\ControllerServiceProvider', 'Illuminate\Cookie\CookieServiceProvider', 'Illuminate\Encryption\EncryptionServiceProvider', 'Illuminate\Foundation\Providers\FoundationServiceProvider', 'Illuminate\Hashing\HashServiceProvider', 'Illuminate\Pagination\PaginationServiceProvider', 'Illuminate\Pipeline\PipelineServiceProvider', 'Illuminate\Queue\QueueServiceProvider', 'Illuminate\Redis\RedisServiceProvider', 'Illuminate\Session\SessionServiceProvider', 'Illuminate\Validation\ValidationServiceProvider', 'Illuminate\View\ViewServiceProvider', 'October\Rain\Foundation\Providers\ArtisanServiceProvider', 'October\Rain\Database\DatabaseServiceProvider', 'October\Rain\Filesystem\FilesystemServiceProvider', 'October\Rain\Parse\ParseServiceProvider', 'October\Rain\Html\HtmlServiceProvider', 'October\Rain\Html\UrlServiceProvider', 'October\Rain\Network\NetworkServiceProvider', 'October\Rain\Scaffold\ScaffoldServiceProvider', 'October\Rain\Flash\FlashServiceProvider', 'October\Rain\Mail\MailServiceProvider', 'System\ServiceProvider')) in Application.php line 468 at Application->registerConfiguredProviders() in RegisterProviders.php line 15 at RegisterProviders->bootstrap(object(Application)) in Application.php line 183 at Application->bootstrapWith(array('October\Rain\Foundation\Bootstrap\RegisterClassLoader', 'Illuminate\Foundation\Bootstrap\DetectEnvironment', 'October\Rain\Foundation\Bootstrap\LoadConfiguration', 'October\Rain\Foundation\Bootstrap\LoadTranslation', 'October\Rain\Foundation\Bootstrap\ConfigureLogging', 'Illuminate\Foundation\Bootstrap\HandleExceptions', 'Illuminate\Foundation\Bootstrap\RegisterFacades', 'October\Rain\Foundation\Bootstrap\RegisterOctober', 'Illuminate\Foundation\Bootstrap\RegisterProviders', 'Illuminate\Foundation\Bootstrap\BootProviders')) in Kernel.php line 199 at Kernel->bootstrap() in Kernel.php line 110 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 84 at Kernel->handle(object(Request)) in index.php line 43

    Any fix for this?

  • Found the plugin useful on 21 Apr, 2017

    Nice work :)

  • Found the plugin useful on 5 Mar, 2017

    F - A - N - T - A - S - T - I - C

  • Found the plugin useful on 10 Feb, 2017

    i download the theme vega pro and i have an error because i don't have the layout clean.https://octobercms.com/theme/vojtasvoboda-vega-pro

  • Found the plugin useful on 27 Jan, 2017

    is there a local language file for welsh if not how do I go about creating one

  • Found the plugin useful on 19 Jan, 2017

    Hello, good plugin but how translate static menu?

  • Found the plugin useful on 30 Oct, 2016

    Really useful, specially with the new url translation feature! Thank you very much!

  • Found the plugin useful on 5 Oct, 2016

    if you need to access the active language from the code, use the Translator class: $this-&gt;translator = Translator::instance(); $this-&gt;locale = $this-&gt;translator-&gt;getLocale();

  • Found the plugin useful on 17 Jul, 2016

    Hey i didnt find any option to identify the lang in process. i want to change RTL for hebrew lang, for custom css. anyway i can do it? thanks.

  • Found the plugin useful on 30 Jun, 2016

    I find this plugin really useful!!! Some Bug... Hebrew not work! I Changed he to heb but steel Translate Messages not works! You may Look at the my site www.ghiml.co.il. Content in hebrew header and footer in english.

  • Found the plugin useful on 28 Jun, 2016

    It is amazing!!!!

  • Found the plugin useful on 10 Jun, 2016

    Thanks! That's what I was looking for! But not figure out possibility to use partials files as content files.

  • Found the plugin useful on 28 May, 2016

    Very nice plugin! I there an option to convert cyrillic characters to latin only? Like on button click

  • Found the plugin useful on 12 Apr, 2016

    Love this plugin! @Hessel, it will be perfect real soon! It already works in our testing website with the option for "Bleeding edge updates" turned on. I think it all wil be part of the upcoming version 1

  • Found the plugin not useful on 21 Mar, 2016

    It would be perfect if it worked with Static Pages!! But unfortunatelly it doesn't =( Rainlab doesn't respond to any questions or feedback from users since 2014

  • Found the plugin useful on 16 Feb, 2016

    It is the most useful translation system. Thanks ans sorry for my english :D

  • Found the plugin useful on 5 Feb, 2016

    Cool!

  • Found the plugin useful on 18 Oct, 2015

    This is quite good plugin and the methods are easy enough but unfortunately without url translation it negatively infects the SEO so cannot be used for paying customers.

  • Found the plugin useful on 11 Oct, 2015

    very awosem loving october deep down!

  • Found the plugin useful on 5 Oct, 2015

    Awesome plugin, thanks for that!

  • Found the plugin useful on 17 Aug, 2015

    This is a great plugin but I am having a hard time with caching.

    For example if I navigate to the Pirate's language URL then switch back to English I still view the Pirate language messages. I tried clearing the cache thousand times in my console, in the plugin interface, using a cache cleaner plugin /disabling cache and settings English as default language!

    I'd like to know if this is a bug and if not why is this happening. Am I missing something ?

    Again Thank you Samuel for this life-saver CMS / plugins.

  • Found the plugin useful on 1 Aug, 2015

    Thank you! This plugin is life-saver! ;)

  • Found the plugin useful on 31 May, 2015

    it's very useful for my project

  • Found the plugin useful on 4 May, 2015

    Hi, many thanks for this quality work. I live in Belgium and here, any site must be multilingual, we have three national languages. How to directly detect the browser language?

  • Found the plugin not useful on 30 Apr, 2015

    Hello. This not working in home page

  • Found the plugin useful on 29 Apr, 2015

    cool...thanks :D

  • Found the plugin useful on 5 Mar, 2015

    Amazing plugin! Thanks for all the hard work! :)

  • Found the plugin useful on 15 Feb, 2015

    Спасибо! :)

  • Found the plugin useful on 22 Dec, 2014

    Really helpful. @VoipDeploy Why don't you just open an issue in github?

  • Found the plugin not useful on 5 Nov, 2014

    because of the reported issues, plugin is useless for me. i ended up putting translations directly to the database as i gone tired and really frustrated with messages not saving from the GUI.

  • Found the plugin useful on 3 Nov, 2014

    How about translating the url itself? it would be nice to translate the path when creating new pages...

  • Found the plugin useful on 22 Oct, 2014

    how to handle content translation inside blog post? such as wordpress plugin qtranslate.

  • Found the plugin useful on 12 Aug, 2014

    Oh yeas I find this plugin really useful. Thank you very much, it's awesome.

2.2.10

Fixes timestamp SQL error on attributes table

Jun 14, 2024

2.2.8

Fixes issue sending mail with different site context

Feb 17, 2024

2.2.7

Improve theme scanner to show active theme and include component partials

Jul 29, 2023

2.2.6

Adds option to disable fallback values when writing attributes

May 31, 2023

2.2.5

Fixes storing attributes via setAttributeTranslated

May 25, 2023

2.2.4

Fixes bug where translations are lost by unintentional cleanup

May 10, 2023

2.2.3

Fixes translatable fields with fallback values

Apr 09, 2023

2.2.2

Fixes translatable models without timestamps

Jan 25, 2023

2.2.1

Fixes translated checkboxes

Jan 17, 2023

2.2.0

Adds localePage Twig filter for translating page URLs

Jan 14, 2023

2.1.3

Fixes installation of Translate with other dependencies

Dec 20, 2022

2.1.2

Fixes translatable integration with settings models

Dec 15, 2022

2.1.1

Fixes child menu item translations for pages plugin

Nov 26, 2022

2.1.0

Adds support for translatable file attachments

Nov 11, 2022

2.0.6

Restores the post scan purge feature in messages

Oct 14, 2022

2.0.5

Reset locale when edit site changes programatically

Oct 12, 2022

2.0.4

Include component default partials in theme scanner

Oct 09, 2022

2.0.3

Remove deprecated class

Oct 06, 2022

2.0.2

Fixes various bugs in message translation

Oct 06, 2022

2.0.1

Create message data store

Oct 05, 2022

2.0.0

Major upgrade and multisite integration

Oct 05, 2022

1.12.0

Adds scopeTransWhereNoFallback method

Jul 21, 2022

1.11.1

Improve support with October v3.0

May 13, 2022

1.11.0

Update to latest Media Finder changes in October v2.2

May 02, 2022

1.10.5

Fixes media finder when only 1 locale is available

Apr 05, 2022

1.10.4

Improve media finder support with October v2.2

Apr 05, 2022

1.10.3

Multilingual control improvements

Mar 12, 2022

1.10.2

Improve support with October v2.2

Mar 11, 2022

1.10.1

Improve support with October v2.0

Feb 26, 2022

1.10.0

Adds new multilingual nested form widget. Adds withFallbackLocale method.

Feb 26, 2022

1.9.3

Improves support when using child themes

Nov 10, 2021

1.9.2

Fixes issue creating new content in CMS Editor

Jun 24, 2021

1.9.1

Minor styling improvements

Jun 10, 2021

1.9.0

Restores ability to translate URLs with CMS Editor in October v2.0

May 31, 2021

1.8.8

Fixes Laravel compatibility in custom Repeater.

May 27, 2021

1.8.7

Fixes Markdown editor translation.

May 21, 2021

1.8.6

Fixes invisible checkboxes when scanning for messages.

Apr 30, 2021

1.8.4

Fixes the multilingual mediafinder to work with the media module.

Apr 29, 2021

1.8.2

Fixes translated file models and theme data for v2.0. The parent model must implement translatable behavior for their related file models to be translated.

Apr 22, 2021

1.8.1

Minor bugfix

Apr 17, 2021

1.8.0

Adds initial support for October v2.0

Apr 17, 2021

1.7.4

Faster version of transWhere

Nov 17, 2020

1.7.3

Make plugin ready for Laravel 6 update

Oct 02, 2020

1.7.2

Fix regex when "|_" filter is followed by another filter

Jun 18, 2020

1.7.1

Fix YAML issue with previous tag/release.

Apr 21, 2020

1.7.0

!!! Breaking change for the Message::trans() method (params are now escaped)

Apr 20, 2020

1.6.10

Add option to purge deleted messages when scanning messages

Apr 06, 2020

1.6.9

Clear Static Page menu cache after saving the model; CSS fix for Text/Textarea input fields language selector.

Mar 15, 2020

1.6.8

Add support for transOrderBy; Add translatoin support for ThemeData; Update russian localization.

Feb 28, 2020

1.6.7

Introduce migration to patch existing indexes using morph map

Feb 05, 2020

1.6.6

Introduce migration to patch existing translations using morph map

Jan 21, 2020

1.6.5

Fixes compability issue when other plugins use a custom model morph map

Jan 20, 2020

1.6.4

Fixes PHP 7.4 compatibility

Jan 11, 2020

1.6.3

Add eager loading for translations, restore support for accessors & mutators

Dec 13, 2019

1.6.2

Implement localeUrl filter, add per-locale theme configuration support

Jul 23, 2019

1.6.1

Add ability for models to provide translated computed data, add option to disable locale prefix routing

Jul 23, 2019

1.6.0

Make File Upload widget properties translatable. Merge Repeater core changes into MLRepeater widget. Add getter method to retrieve original translate data.

May 01, 2019

1.5.0

Compatibility fix with Build 451

Apr 01, 2019

1.4.5

Fixed issue when using the language switcher

Jan 08, 2019

1.4.4

Minor improvements to compatibility with Laravel framework.

Jan 07, 2019

1.4.3

!!! Please update OctoberCMS to Build 444 before updating this plugin. Added ability to translate CMS Pages fields (e.g. title, description, meta-title, meta-description)

Dec 23, 2018

1.4.2

Add multilingual MediaFinder

Dec 06, 2018

1.4.1

Updated Hungarian translation. Added Arabic translation. Fixed issue where default texts are overwritten by import. Fixed issue where the language switcher for repeater fields would overlap with the first repeater row.

Aug 30, 2018

1.4.0

Add importer and exporter for messages

Feb 14, 2018

1.3.8

Keep query string when switching locales

Jan 28, 2018

1.3.7

Fix config reference in LocaleMiddleware

Jan 11, 2018

1.3.6

Fix Middleware to use the prefixDefaultLocale setting introduced in 1.3.4

Jan 07, 2018

1.3.5

Fix MLRepeater bug when switching locales.

Dec 22, 2017

1.3.4

Add alternate hreflang elements and adds prefixDefaultLocale setting.

Nov 17, 2017

1.3.3

Fix to the locale picker session handling in Build 420 onwards.

Nov 02, 2017

1.3.2

Improved compatibility with RainLab.Pages, added ability to scan Mail Messages for translatable variables.

Oct 26, 2017

1.3.1

Added reordering to languages

Aug 29, 2017

1.3.0

Added search to the translate messages page.

Jul 14, 2017

1.2.12

Add support for translating the new grouped repeater feature.

Apr 23, 2017

1.2.11

Fixes translation not working with partials loaded via AJAX

Apr 10, 2017

1.2.10

Minor UI fix to the multilingual repeater.

Feb 02, 2017

1.2.9

Fixes context for translated strings when used with Static Pages.

Jan 10, 2017

1.2.8

Improvements to code for latest October build compatibility.

Dec 13, 2016

1.2.7

Fixes placeholder usage with static pages plugin.

Nov 11, 2016

1.2.6

Fixes repeater usage with static pages plugin.

Nov 04, 2016

1.2.5

Adds new multilingual repeater form widget.

Oct 22, 2016

1.2.4

Translatable attributes can now be declared as indexes.

Aug 19, 2016

1.2.3

Fixes Rich Editor when inserting a page link.

Aug 12, 2016

1.2.2

Static Pages now support translating the URL.

Aug 05, 2016

1.2.1

Minor update in the rich editor and code editor language control position.

Jul 31, 2016

1.2.0

CMS pages now support translating the URL.

Jul 29, 2016

1.1.7

Fixes bug not showing content when first loading multilingual textarea controls.

Jul 12, 2016

1.1.6

Minor improvements in the message editor.

Jul 11, 2016

1.1.5

Minor update to the multilingual control API.

Jul 04, 2016

1.1.4

Adds new multilingual markdown editor.

May 25, 2016

1.1.3

Improved support for the multilingual rich editor.

May 23, 2016

1.1.2

Add support for translating Static Content files.

May 06, 2016

1.1.1

Minor UI fix to the language picker.

Apr 20, 2016

1.1.0

Introduce compatibility with RainLab.Pages plugin.

Apr 01, 2016

1.0.11

Fix multilingual rich editor when used in stretch mode.

May 15, 2015

1.0.10

Minor fix for latest build.

Apr 28, 2015

1.0.9

Fixes an issue where newly created models lose their translated values.

Mar 13, 2015

1.0.8

Minor bug fixes

Mar 04, 2015

1.0.7

Fixes major bug where translations are skipped entirely!

Feb 26, 2015

1.0.6

Minor improvements to the code.

Feb 13, 2015

1.0.5

Add spanish language and fix config plugin .

Nov 21, 2014

1.0.4

Locale cache will clear when updating a language.

Oct 10, 2014

1.0.3

Minor updates for latest October release.

Sep 28, 2014

1.0.2

Languages and Messages can now be deleted.

Aug 05, 2014

1.0.1

First version of Translate

Aug 02, 2014

This guide can be used to help migrate from RainLab.Translate v1 to v2. It should be straight forward process without any major disruptions.

Beginning from October CMS v3.1, a multisite feature was introduced that supercedes many functions provided by the RainLab.Translate plugin. The existing data structures are preserved so all translations are carried across and no "retranslation" or modifying existing plugins should be needed.

Upgrade Instructions

  1. Run php artisan plugin:install rainlab.translate to request the latest version (you do not need to uninstall v1 first).

  2. Navigate to System → Sites and create a site for each locale used by the website.

  3. Replace the localePicker and alternateHrefLangElements components used in the front end (see below).

  4. Migrate theme messages using php artisan translate:migratev1 (non destructive).

  5. Continue using this plugin as normal.

Key Differences

  • The "Languages" settings area is replaced by the "Sites" settings area. This is where available sites are defined, including the available languages.

  • The per-field language picker is replaced by a per-site language picker. The translator selects the active language globally and can perform comparisons using multiple browser tabs.

  • Storing the locale in the session is no longer used and must be determined by the site definition, as a hostname or route prefix.

Key Similarities

  • Models are still translated using the RainLab\Translate\Behaviors\TranslatableModel.

  • Theme translation is still managed by this plugin.

Breaking Changes

Middleware class is replaced

If using PHP routes to determine locale, the RainLab\Translate\Classes\LocaleMiddleware class is replaced by the System\Middleware\ActiveSite middleware class.

CMS Components replaced

The localePicker and alternateHrefLangElements components provided by this plugin have been replaced by the sitePicker component.

Here is the sample code to replace the localePicker component:

<select class="form-control" onchange="window.location.assign(this.value)">
    {% for site in sitePicker.sites %}
        <option value="{{ site.url }}" {{ this.site.code == site.code ? 'selected' }}>{{ site.name }}</option>
    {% endfor %}
</select>

Here is the sample code to replace the alternateHrefLangElements component:

{% for site in sitePicker.sites %}
    <link rel="alternate" hreflang="{{ site.locale }}" href="{{ site.url }}" />
{% endfor %}

Events Updated

The translate.localePicker.translateQuery event has been replaced by the cms.sitePicker.overrideQuery. The arguments are the same except the site definition is passed instead of the locale code, use the hard_locale attribute of the site definition to obtain the locale.

Event::listen('cms.sitePicker.overrideQuery', function($page, $params, $currentSite, $proposedSite) {
    if ($page->baseFileName == 'your-page-filename') {
        return YourModel::translateQuery($params, $currentSite->hard_locale, $proposedSite->hard_locale);
    }
});

The translate.localePicker.translateParams event has been replaced by the cms.sitePicker.overrideParams event. The arguments are the same except the site definition is passed instead of the locale code, use the hard_locale attribute of the site definition to obtain the locale.

Event::listen('cms.sitePicker.overrideParams', function($page, $params, $currentSite, $proposedSite) {
    if ($page->baseFileName == 'your-page-filename') {
        return YourModel::overrideParams($params, $currentSite->hard_locale, $proposedSite->hard_locale);
    }
});