Information for: DEVELOPERS   PARTNERS   SUPPORT

Configuring multilingual Magento

Magento uses different store views to separate and handle multilingual content. You can configure Magento for multiple store views or locales, mapped to multiple Drupal stores and languages through the Commerce Connector Service. For full documentation about configuring multiple store views in Magento, see the Adding a Language Magento documentation page.

Configuring store views and locales in Magento

To ensure that Drupal and Magento can communicate, you need to configure Magento with the necessary locale information, and ensure that it has the correct settings to connect to the Acquia Commerce Manager API, by completing the following steps:

  1. Ensure Magento is installed and has at least a basic configuration.

  2. Sign in to Magento as an administrator.

  3. In the admin menu, go to Stores > All Stores > Create Store View.

  4. Provide values for the following fields:

    • Store: Select a Store from the list.
    • Name: Create a name for the store view that reflects the purpose of the view. For example, Main Site en_US view for the primary United States store view in English.
    • Code: A machine-friendly name for the view. It may, but is not required to, match your view Name, using underscores instead of spaces between each word.
    • Status: Enable or disable your store view.
    • Sort order: Add a manual sort order.
  5. Click Save Store View.

  6. For each store you create, make note of the store view Code, and review the admin URL to identify the Store view ID. In an admin URL containing ...editStore/store_id/3/key/… the Store view ID is 3. Acquia recommends you use the Magento Store view ID in Drupal to identify the correct store view. Your list of store view Code and Store view ID fields should be similar to this example: +———————+—————+ | Store view code | Store view ID | +=====================+===============+ | default | 1 | +—————–+——————-+ | main_fr_ca_view | 3 | +—————–+——————-+ | main_es_mx_view | 4 | +———————+—————+

  7. In the admin menu, go to Settings > Configuration > General > Locale Options.
    The current Magento scope will appear next to the Store View label. Your Magento installation will generally be set to the Default Config scope. For more information, see the Scopes Magento documentation page.

    Magento store scopes

  8. Set each store view to its required locale by selecting a Locale from the menu. Other fields may be set manually, or by the system to a default value.

  9. Click Save Config.

  10. To set another store view to another locale, click the down arrow for the Magento configuration scope, and then select a different Store View, such as Main site es_MX.

    Switching store views

  11. In the Locale menu, select the correct locale, such as Spanish (Mexico).

  12. Click Save Config.

With your store views complete, enter all the translations for the products and categories. For more information, see the Translating Products Magento documentation page.

Update the Acquia Commerce API settings

Next, you must create unique IDs that can be mapped between Magento and the Commerce Connector Service. Ensure your Magento installation is configured for use with Drupal.

  1. Sign in to Magento as an administrator.
  2. In the admin menu, go to Stores > Configuration > Services > Magento Web API > Acquia Commerce API settings > Acquia Commerce Manager ID.
  3. Using the Magento configuration scope, set Acquia Commerce Manager ID for the default store view and set a different Acquia Commerce Manager ID for each additional store view (locale). Each store view’s Acquia Commerce Manager ID must be different. Acquia recommends making the Acquia Commerce Manager ID the same as the store view code but there is no requirement to do so.
  4. Click Save Config for each store view.

Be sure to note your Acquia Commerce Manager ID and the locale that it corresponds to; you will need this for mapping purposes. Each ID identifies the store mapping to the Commerce Connector Service to ensure that the correct Drupal language connects to the correct Magento store view.

With your saved information, you can proceed to map Drupal and Magento to each other.