Magento Expert Forum - Improve your Magento experience

Results 1 to 2 of 2

Create translation dictionaries and language packages

  1. #1
    Junior Member
    Join Date
    Apr 2016
    Posts
    382
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Create translation dictionaries and language packages

    Create translation dictionaries and language packages

    View more Magento 2 Themes

    Name:  magento-2-translation.jpg
Views: 8
Size:  354.2 KB

    For Magento 2 translation, there are many ways to translate theme,
    extension or frontend và backend. In this tutorials, we’ll find out how
    to translate all things in Magento 2 effectively.

    1.Run the following command

    php bin/magento i18n:collect-phrases -o fr_FR.csv -m /Library/WebServer/Documents/lof/magento2

    Above command will create 1 file fr_FR.csv contained entire text which can be translated into folder /Library/WebServer/Documents/lof/magento2

    Name:  2016-06-13_14-19-04.png
Views: 8
Size:  28.6 KB

    Edit text

    “You have no items in your shopping cart.”,”Votre panier d’achat ne contient plus aucun produit.”,

    2.Create the need directories

    a) Create folder app/i18n
    b) Create folder app/i18n/Test
    c) Create folder app/i18n/Test/fr_FR

    Create the need files
    a) Create file app/i18n/Test/fr_FR/composer.json within content:

    PHP Code:
    {
    "name""Lof/language-fr_fr",
    "description""French Language",
    "version""100.0.2",
    "license": [
    "OSL-3.0",
    "AFL-3.0"
    ],
    "require": {
    "magento/framework""100.0.*"
    },
    "type""magento2-language",
    "autoload": {
    "files": [
    "registration.php"
    ]
    }

    b) Create file app/i18n/Test/fr_FR/language.xml

    PHP Code:
    1 <?xml version="1.0"?>
    2 <!-- /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -->
    3 <language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
    4  <code>fr_FR</code>
    5  <vendor>lof</vendor>
    6  <package>fr_fr</package>
    7 </language>
    c) Create file app/i18n/Test/fr_FR/registration.php
    PHP Code:
    <?php
    /**
    3 * Copyright © 2015 Magento. All rights reserved.
    4 * See COPYING.txt for license details.
    5 */
    \Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::LANGUAGE,
    'lof_fr_fr',
    9  __DIR__
    10 
    );
    d) Copy file fr_FR.csv into folder

    Name:  2016-06-13_15-30-33.png
Views: 8
Size:  24.0 KB

    3. Access to Admin

    Admin > Store > Configuration > General > Locale Options and change to Locacle = French(France)

    Name:  2016-06-13_14-46-42.png
Views: 8
Size:  28.3 KB

    4. Run the following command

    Name:  2016-06-13_15-03-59.png
Views: 8
Size:  46.2 KB

    php bin/magento setup:static-content:deploy
    php bin/magento setup:static-content:deploy fr_FR
    php bin/magento indexer:reindex
    php bin/magento cache:clean
    php bin/magento cache:flush

    5. Access to checkout Page



    VIEW DETAIL->

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Nov 2019
    Posts
    1,083
    Thanks
    6
    Thanked 3 Times in 3 Posts

    Default

    Hello there!

    I have a wonderful option to help you translate your website content into different languages without any coding. Use Google Translate Integration Extension For Magento 2 that supports more than 90 languages.

    This is a very unique and simple module that you can easily set on your Magento 2 store and target more customers from different corners of the world. The language would no longer be a problem to grab customers around the world.

    Highlighted Features:

    • Allows translating your website content to more than 90 languages.
    • Ability to add custom code snippet.
    • Offers 3 Different layout options.
    • Automatically translate your Product Description and CMS content.
    • Attract more customers around the world.



    Name:  Google-language-translate-integration-frontend-select-language-option.png
Views: 3
Size:  114.4 KB


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •