Use MageBridge with Advanced Module Manager - Yireo

Language configuration in MageBridge

With MageBridge it is possible to relate a Joomla! multi-lingual extension to a specific Store Group or Store View as is configured in Magento. When setting up a multi-lingual Joomla! site this is vital for your customers: Both the regular Joomla!-parts as the webshop need to be browsed in the exact same language. In this article you will learn how to setup multi-linguality in MageBridge.

Configuration steps

This tutorial covers the following steps to get multi-linguality up and running with MageBridge:

  • Install language packs in Joomla!
  • Install and configure either Joom!Fish or Nooku
  • Install language-modules in Magento
  • Configure locale for each Magento store-view
  • Configure each set of Jooml!Fish/Nooku language and Magento store-view in MageBridge

You will need to upgrade to MageBridge 1.1 or newer for this to work.

Multi-linguality in Joomla!

The Joomla! CMS offers many different functions, but it does not yet offer support for multiple lingual content. When Joomla! 1.5 came out, it added UTF-8 intelligence to Joomla! and offered the possibility to translate both the backend as the frontend to another language. However, this is no the same as multi-lingual content.

Multi-lingual content requires the maintenance of multiple content-items (translations) that refer to the same original. Both the original as the translations need to be kept in sync. In Joomla! you need extra third party extensions to accomplish this - the best known extensions here are Joom!Fish and Nooku. These allow you to translate multiple types of content (articles, weblinks, faq-items) into multiple languages.

Content translation could be taken to an even higher level by translating the content automatically. This kind of intelligence is beyond the scope of Joomla!, unless you want to settle for something like Google Translate.

Setting up languages in Joomla!

To configure languages in either Joom!Fish or Nooku, you will first need to find the right languages for Joomla! - both the frontend as the backend. Normally these language-files can be found through the extensions.joomla.org website. Download the files and install them within the Joomla! Administrator.

Next, install either Joom!Fish or Nooku and follow the steps in their own documentation to get the languages up and running.

Setting up languages in Magento

Within Magento multi-lingual content is also possible, through the configuration of store views. Because MageBridge allows you to configure one single "website" (you can have multiple "websites" in each Magento application) within Joomla!, this leaves you with hierarchy of "store groups" and "store views" within one single Joomla! site.

We recommend to use "store views" for the languages. Within Magento, you need to add for each language a separate store view - browse to System » Manage Stores to configure this. We recommend naming both the "name" as the "code" to something that relates to the language (for instance "German" and "de-DE").

Next, navigate to System » Configuration. Select in the upperleft the scope for one of the new store views, for instance "English". Within this scope, browse to General » Locale Options and set the Locale to the right language. You need to do this for each language.

After you have finished configuring all the necessary store views, you will also need to install the needed language-modules. On the online MagentoConnect website you can find multiple translations of the Magento system. Most of them are maintained by the community. Install them as a regular Magento extension by using the extension-key. Magento will automatically connect the locale of the store view to the right translation.

MageBridge connectors

With MageBridge you can use regular Joomla! plugins to extend te behavior. But connecting MageBridge itself to a different Magento store requires a different approach. For this, internal connectors are used. A connector adds extra intelligence to MageBridge. In this case we are configuring so-called store connectors.

A store connector allows you to configure "some kind of logic" to "some kind of store-type". We want the "logic" of either Joom!Fish or Nooku to tell us which "store-type" to use. In the future, other store-connectors with cool features will be added as well.

Within MageBridge, navigate to Stores and click New. If Joom!Fish is installed within Joomla!, MageBridge will automatically enable the Joom!Fish connector. You only need to select the proper Store View and the proper language.

Languages in the Joomla! core

As of Joomla! 1.6, multilinguality was added to the Joomla! core itself - bypassing the need for third party extensions. Within the Joomla! Language Manager, each language can have a URL Language Code (for instance en for English) which is added to the SEF URLs that Joomla! generates. To actually use this URL Language Code, the System - Language Filter plugin needs to be enabled. One of the features of this plugin is to detect the actual language by using this URL-prefix.

But another feature of this plugin is to redirect a non-prefixed URL to a prefixed URL. For instance, if the URL http://JOOMLA/furniture is being called, the plugin redirects to http://JOOMLA/en/furniture. It is important to note that this causes issues when Magento calls back to Joomla! using JSON-RPC (for instance when syncing users). To prevent MageBridge from having problems with this, the parameters of the System - Language Filter plugin need to be modified: The option Remove default language prefix should be set to Yes. Note that Joomla! 1.6 and earlier versions of Joomla! 1.7 did not contain this setting - you will need to update to the latest available Joomla! version. Also note that this approach is the recommended solution.

Alternatively, you can customize the used JSON-RPC URL (which is the path to the JSON API within the MageBridge component in Joomla!) by modififying the Magento System Configuration. Under the MageBridge settings, the API URL is normally detected automatically - however the detected value does not contain the URL-prefix. To add the URL-prefix, set API Auto-detect to No and modify the value of API URL as needed. This solution is less preferred (because it disables API-detection) but should be working nonetheless.

Created on Saturday, 08 August 2009
Modified on Saturday, 28 January 2012

About Yireo

Yireo tries to help webdevelopers build successful Joomla! and Magento sites.

More about Yireo