Multi Language Support Extension (MLS)

Biber Ltd. Multi Language Support

ExpressionEngine 2.x native language support offers only backend support. Multi Language Support extension brings frontend multi-lingual support to ExpressionEngine 2.x.


licence: commercial  
version: 2.1.8  
author: Can Berkol  
last updated: 25.06.2011


Features

     
  • Hide extension setting panels from selected member groups.
  •  
  • Automatic translated output of channel custom-field based translations.
  •  
  • Let’s you define your own language / language code pairs a.k.a translations.
  •  
  • Let’s you define aliases for your languages.
  •  
  • Let’s you choose the translation storage engine. You can either utilize your database or you can save translations into files.
  •  
  • Automatically creates / removes routing folder and files for your added languages.
  •  
  • Default language mode selection: from browser, user cookies, or user settings.
  •  
  • Define default language for front-end (seperate from your control panel).
  •  
  • Comes with Matrix compatible Language List Fieldtype for easier development.
  •  
  • Adds five global variables that you can use in your templates: language, language_code, default_language, default_language_code, site_url_wlc.
NOTICE

This extension comes with two companion plugins Biber Ltd. Get Text Plugin and Biber Ltd. Language Switcher.

WARNING

If you are upgrading to 2.1.3 make sure to copy lang.bbr_mysite.php for each of the language folders located in third_party/bbr_multilanguagesupport folder if you use File as Storage Engine..

WARNING

For this extension to work properly the file permissons for your root folder (i.e public_html or www) must be set to 755 or 777.

WARNING

This plugin enables you to change language by attaching the language code after your domain (i.e. http://www.yoursite.com/en/). If you want to change this to a subdomain syntax you need to add an .htaccess file to all freshly created language folders. Also for SEO friendly URLs; you need to maintain sepearate .htacess files at all freshly created language folders.

INDEX

     
  1. Installation
  2.  
  3. Usage
  4.  
  5. Related Plugins
  6.  
  7. Support
  8.  
  9. Buy & Download  
  10.  
  11. Change Log

Installation  

For extension to work flawlessly, you need to follow all the steps carefully.

     
  1. Download The Extension  
    You can buy & download this extension from Devot:ee or from the BUY & DOWNLOAD section of this document.  

  2. Unpack the compressed file that you have downloaded.
  3. Upload Files to Your Server
     
    Once you have unpacked your compressed file, you will see four folders named bbr_gettext, bbr_langswitcher, bbr_languagelist, bbr_multilanguagesupport.

    Upload all of the files into your Expression Engine 2.0’s system/expressionengine/third_party folder.  

    In bbr_multilanguagesupport folder you will see an additional themes folder. Within that folder there is a third_party folder and within that folder you will see another bbr_multilanguagesupport folder. You have to move that folder into your EE’s themes/third_party folder.  

    bbr_gettext stores information about the companion plugin and you can find the detailed instructions about this plugin in here.  

    bbr_langswitcher stores information about the companion plugin and you can find the detailed instructions about this plugin in here.  

    bbr_languagelist stores information about the companion field type and you can find the detailed instructions about this plugin in here.  

  4. Enable Extension Login to your Expression Engine 2.x. control panel and go to Add-ons > Extensions.

    You will see Biber Ltd. Multi Language Support in the extensions list. Click on Enable link under the status column.  

       
    • If you don’t see the extension in your list, check if you have uploaded all the files in the correct folder.
    •  
  5. Setup Your Extension
     
    Once you have enabled your extension you will see Settings link is activated. Click on it.

    After you edited your settings, you need to click to “Save” button.  

    Extension Settings  

    The plug-in installs with English as the default language; since English is the default language for EE 2.0.  

    There are 5 options that you need to set.  

    Settings Visibility  

    You can hide the settings panel from some member groups. All you have to do is to select the groups from which you want to hide the settings panel. Note that the default “Super Admins” group is not visible on this list. The settings panel is the first part of the MLS settings screen where you define different aspects of MLS.

    Translations Visibility  

    You can hide the translations panel from some member groups. All you have to do is to select the groups from which you want to hide the settings panel. Note that the default “Super Admins” group is not visible on this list. The settings panel is the first part of the MLS settings screen where you define key-based translations.

    Default Language Mode:  

    This option defines the mechanism that sets the language for new visitors, if they access the site without any language identifier (i.e. http://www.yoursite.com/).

    Default Language Mode There are three options listed here.  

       
    • From Browser: The site language is set to whatever the visitor’s browser language is. If the browser language is one of the not-supported languages by your site the site language is set to default language you have defined.
    •  
    • From Cookie: The site language is set to to default language stored in user cookie.
    •  
    • From System: The site language is set to to default language you have defined.
    •  

    Default Language:  

    This option defines your choice of default language. If for a visitor no other language can be set, this is the language that your site will be shown.

    Default Language  

    This list is populated with languages defined in Available Languages section.  

    Available Languages:  

    This option defines available languages for your site. Here you can add / remove / edit languages that you plan your side is served.

    Available Languages  

     
  • Add a New Language:  
    To add a new language you simply need to click the plus (+) sign at the bottom of the form. Once you click on “Save” button your settings will take affect.  

    CAUTION:  

     
    Language field must contain only alphabetical characters (characters from only the English alphabet). No special characters with umlauts etc. is allowed here. You can use a space, and the character case is not important.

    Language Alias can have any value of your choice.  

    Language Code field must be an internationally recognized two-letter language code. If you put a non-standard language code here, the auto detection will malfunction. For example you can enter “en” for English, “de” for German, “tr” for Turkish, and “pt” for Portuguese.  

  • Remove a Language:
     
    To remove a language you simply need to click the icon towards right of the language you want to delete. Once you click on “Save” button your settings will take affect.

  • Edit a Language:
     
    To edit a language; click on the input box of your choice, change the value and hit on the “Save” button.

    CAUTION:  

     
    Language field must contain only alphabetical characters (characters from only the English alphabet). No special characters with umlauts etc. is allowed here. You can use a space, and the character case is not important.

    Language Code field must be an internationally recognized two-letter language code. If you put a non-standard language code here, the auto detection will malfunction. For example you can enter “en” for English, “de” for German, “tr” for Turkish, and “pt” for Portuguese.  

    Storage Engine:  

    This option defines where you will save your translations.

    Default Language Mode  

    There are two options listed here.  

  • Database: Your translations will be saved into extension settings. Use this opion only if you encounter file permission problems.
  • File: Your translations will be saved into a language file. There will be a separate file for each of the languages.

Static Text and Translations:

This option lets you define as many static text as you want. This way you can output any custom text in given language in your templates. Static Text and Translations

Defined text is accessible via template variables using {bbr-mls-key} where key is your defined key for given text.

CAUTION:

 
key field must contain only alphabetical characters (characters from only the English alphabet). No special characters with umlauts etc. is allowed here. You can use a dash and underscore, and the character case is not important.

CAUTION:

Disabling the extension will cause you to lose all your settings including your translations unless you have chosen “File” as your storage engine.  

Usage

In order to use this extension for weblog / channel entries you need to set-up a new weblog field for each language.

The extension adds five global template variables:

     
  • {language}  
    Outputs the current language i.e. turkish
  •  
  • {language_alias}  
    Outputs the current language alias i.e. Deutsch
  •  
  • {language_code}  
    Outputs the current language code i.e. tr
  •  
  • {default_language}  
    Outputs the default language that is specified in your extension settings i.e. english
  •  
  • {default_language_alias}  
    Outputs the default language alias that is specified in your extension settings i.e. en
  •  
  • {default_language_code}  
    Outputs the default language code that is specified in your extension settings i.e. en
  •  
  • {site_url_wlc} (Only available when “Keep Untouched” site_url mode is set)  
    Outputs your site url with current language code appended to it i.e. www.domain.com/en/.

This extension dynamically modifies one global template variables - {site_url}  
Outputs your site url appended the current selected language to the url that you have set in your config.  
i.e. http://www.yoursite.com/en/ if English is selected

Example Scenario: We have a car dealer site with a channel dedicated to store car information.

Now let’s say we want to store description for each car we have.

Normally, you will define a new field named “description” and you will use {description} in your templates to output the contents of the description.

The best practice to work with Biber Ltd. Multi Language Support plugin is to define all multi-lingual fields with a pre or post fix attached to the field name. The pre-post fixes must be equal to the language codes that you have defined in Available Languages section of extension settings.

Let’s say we want our site to be presented in English and German.

In this case the best thing to do is to define two seperate fields one with the name description_en and the other with the name description_de.

{description_{language_code}} to display the description in desired language.

To get this a step forward you can do the following:

{if ’{description_{language_code}}’ != ’‘}
 
     {description_{language_code}}
 
{if
:else}
 
     {description_{default_language_code}}
span style=“color: rgb(0, 0, 187);”>
 
{
/if} 

The above code will output description in desired language and if the description does not exist in desired language then it will output the description in default language assumed that all necessary fields are defined and filled.

As of 2.1.x you can also do this:

{bbr-mls:description}

This will output the same thing as the above code.

Note that this notation will not work with majority of third-party field types and rich content field types which accept HTML fragments.  

Related Plugins

Support

You may contact us at support@biberltd.com. Please do not forget to provide your e-mail address that you have supplied during your purchase and the license key if you have been supplied any.

BUY & DOWNLOAD

     
  • You may not copy / distribute / redistribute / sell / resell / reproduce / transfer the Software to any third party.
  •  
  • You may not sell or rent the Software or portions thereof.
  •  
  • You may not use the Software in violation of laws of the Republic of Turkiye, United Stats or other international law or regulations.
  •  
  • Each purchase is valid for one installation of Expression Engine 2.x. You need only one license for MSM module
  •  
  • The software will be sent to you within 8 hours of your purchase. The software will be send as an attachment within a .zip file from support@biberltd.com
  •  
  • All copyright and proprietary notices and logos in the Control Panel and within the Software files must remain intact.
  •  
  • You may make copies of the Software for back-up purposes, provided that you reproduce the Software in its original form and with all proprietary notices on the back-up copy.
  •  
  • You may alter, modify, or extend the Software for your own use, or commission a third-party to perform modifications for you, but you may not resell, redistribute or transfer the modified or derivative version without prior written consent from Biber Bilişim Teknolojileri ve Dış Ticaret Ltd. Şti.
  •  
  • Technical support is available only through support@biberltd.com. No representations or guarantees are made regarding the response time in which support questions are answered.
  •  
  • You may test the Software for 10 days risk-free. If you do not like the Software you may apply for a refund. In case of refund you need to irrevesible destroy the software and never use it in any of your projects. All transaction fees will be applied to deducted from your refund.
  •  
  • You agree to indemnify and hold harmless Biber Bilişim Teknolojileri ve Dış Tic. Ltd. Şti. for any third-party claims, actions or suits, as well as any related expenses, liabilities, damages, settlements or fees arising from your use or misuse of the Software, or a violation of any terms of this license.
  •  
  • THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF QUALITY, PERFORMANCE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. FURTHER, ELLISLAB INC. DOES NOT WARRANT THAT THE SOFTWARE OR ANY RELATED SERVICE WILL ALWAYS BE AVAILABLE.
  •  
  • YOU ASSUME ALL RISK ASSOCIATED WITH THE INSTALLATION AND USE OF THE SOFTWARE. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE FOR CLAIMS, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE. LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, INCLUDING BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS.

Notice

You can obtain updates by simply sending us a support request.  

 
 

                             
      Licenses
     

 
 


Change Log

v.2.1.8


     
  • site_url mode setting has been finally removed. This will be always set to old “keep untouched” setting.
  •  
  • Setting added to hide settings panel from selected user groups.
  •  
  • Setting added to hide translations panel from selected user groups.
  •  
  • Minor cosmetic changes made.

v.2.1.7


     
  • A path related bug is fixed.
  •  
  • A Language Alias related minor bug is fixed..

v.2.1.6


     
  • The way the index.php is modified has been changed to provide a broader compatibility.
  •  
  • Language Alias field to extension settings and language_alias global variable added.
  •  
  • {language_alias} and {default_language_alias} variables added.

v.2.1.5


     
  • A minor bug is fixed.

v.2.1.4


     
  • A bug fixed that prevented auto translation of multiple custom fields in a given exp:channel:entries tag.

v.2.1.3


     
  • A minor bug fixed may cause notice meessages to be outputted.
  •  
  • Translation files are moved into themes folder.

v.2.1.0


     
  • Now CSS and JS files are stored in themes folder.
  •  
  • Now you can forget about creating if/else statements to output the right custom (translation)field for your channels. All you need to do is to create custom fields such as content_en, content_tr, etc. and in your template within the exp:channel:entries tag pair have {bbr-mls:content} and voila! You’ll get the right output for selected language.

v.2.0.8


     
  • A bug fixed that prevents translations to be saved in a file in rare cases when storage engine is selected as “File”.  

v.2.0.7


     
  • A bug fixed that prevents correct system directory detection when absolute path is entered.  

v.2.0.6


     
  • Minor bug fixes applied to suppress some undesired PHP notices.

v.2.0.5


     
  • Bug fixed that caused the software to output a PHP warning when there is no text defined.
  •  
  • Bug fixed that prevented language folder creation in some linux environments.

v.2.0.4


     
  • Bug fixed that prevented Site URL Mode to be saved when “None” option is selected.
  •  
  • Bug fixed that prevented the first Save button from functioning when no translations have been entered.

v.2.0.3


     
  • Bug that interferes with default language setting mechanism has been fixed.

v.2.0.2


     
  • Bug which prevents translations from being ouputted is fixed when DB as storege engine is selecetd.

v.2.0.1


     
  • Translation storage engine choices added. Now you can either save translation into a file, or you can keep them only in database.
  •  
  • A bug that prevented strings with quotes to be save is fixed.

v.2.0.0


     
  • You can define static text content that you want to use in your templates right within the extension.
  •  
  • Defined text is accessible via template variables using {bbr-mls-key} where key is your defined key for given text.
  •  
  • You can force the actual output of the site url template variable to be actual site url with language code appended to it.

v.1.1.4


     
  • Compatibility with masked system folders added.

v.1.1.3

     
  • Minor bug fixed that prevented cookie mechanism to work properly.

v.1.1.2

     
  • Minor bug fixed that prevented routing index.php files to be edited correctly.

v.1.1.1

     
  • Changed the way the root folder is detected to a more reliable option.
  •  
  • System folder setting is not required anymore and it is removed.

v.1.1.0

     
  • Major bug fixed that caused false member entries in database.
  •  
  • Bug fixed that prevented the extension from working if you had custom database table prefixes.
  •  
  • {site_url} template tag now outputs the site url appended with the currently active language code.
  •  
  • {site_url_pure} global template tag added to let you still have the site url with no language code appended.
  •  
  • Creates index.php smarter by auto-detecting the lines to be replaced.

v.1.0.7


     
  • A new setting has been added where you can define the renamed system folder’s new name.

v.1.0.6


     
  • A workaround has applied to overcome a possible EE bug.
  •  
  • Fixed a bug that caused the installation folder to be falsely identified. Now uses internal constants.
  •  
  • Fixed a bug that assumes that system folder is always named as system.

v.1.0.5


     
  • Fixed a bug that caused the installation folder to be falsely identified. Now uses internal constants.
  •  
  • Fixed a bug that assumes that system folder is always named as system.  

  • A bug fixed that caused a warning to be thrown when user was not logged in and the session user data had an empty “language” value.  

v.1.0.4


     
  • A bug fixed that caused a warning to be thrown when user was not logged in and the session user data had an empty “language” value.

Index | ExpressionEngine | Extensions