Search code examples
refinerycms

How to add multilanguage Refinery CMS control panel?


There is a "Change language" button at the bottom-right of the refinery demo site's control panel.

enter image description here

But the button doesn't show up when I setup my own site. I try to copy some settings in demo site like "I18n Translation Enabled", still lack of luck. Can't find any document on the refinery site or google.


Solution

  • For this add the gem to Gemfile

    It should be there by default, but just double check in case.

    gem 'refinerycms-i18n'
    

    Run the generator

    rails g refinerycms_i18n
    

    Change the language settings

    In Refinery's settings find I18n Translation Frontend Locales (Refinery) and add the ISO country name.

    --- 
    - :en
    - :ru
    - :de
    

    That's it! Visit the Pages tab and you should see flags indicating the page language in the tree. ImageOne

    Edit a page and you'll see the available languages at the top. Simply select one to add content for that language.

    ImageTwo