0

Magento 2.2.6: Some texts are not translated, like Proceed to checkout, Company, Continue Shopping etc.

I am using below string:-

"Proceed to Checkout","ادفع الآن",module,Magento_Checkout
"Proceed to Checkout","ادفع الآن",module,Magento_Customer
"Proceed to Checkout","ادفع الآن",theme,frontend/Magento/blank
"Proceed to Checkout","ادفع الآن",theme,frontend/Magento/luma

"Company","الشركة",module,Magento_Backend
"Company","الشركة",module,Magento_Catalog
"Company","الشركة",module,Magento_Company
"Company","الشركة",module,Magento_Company
"Company","الشركة",module,Magento_Customer
"Company","الشركة",module,Magento_GiftRegistry
"Company","الشركة",module,Magento_Invitation
"Company","الشركة",module,Magento_MultipleWishlist
"Company","الشركة",module,Magento_Paypal
"Company","الشركة",module,Magento_Reports
"Company","الشركة",module,Magento_Sales
"Company","الشركة",module,Magento_User

Even Last name translated properly as below:-

"Last Name","اسم العائلة",module,Magento_Backend
"Last Name","اسم العائلة",module,Magento_Catalog
"Last Name","اسم العائلة",module,Magento_Company
"Last Name","اسم العائلة",module,Magento_Customer
"Last Name","اسم العائلة",module,Magento_GiftRegistry
"Last Name","اسم العائلة",module,Magento_Invitation
"Last Name","اسم العائلة",module,Magento_MultipleWishlist
"Last Name","اسم العائلة",module,Magento_Paypal
"Last Name","اسم العائلة",module,Magento_Reports
"Last Name","اسم العائلة",module,Magento_Sales
"Last Name","اسم العائلة",module,Magento_User

Please let me know how to define the string in translate CSV to translate in other locale.

2
  • I ended up translating this things using inline translation. Another hack/option is to add the translation to translation table in your database.
    – Korbin
    Nov 21, 2018 at 11:20
  • Thanks but I want text in both language Nov 21, 2018 at 11:24

1 Answer 1

-1

Create a new module for Language translations. Add your own language translation file inside it. It will extend existing language pack if it already exist. Create registration.php inside module

    <?php


\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'yourcompanyname_LanguagePack',
    __DIR__
);

crate module.xml file inside etc folder. LanguagePack/etc/module.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="yourcompanyname_LanguagePack" setup_version="1.0.0">

    </module>
</config>

Then Createfolder i18n inside your module and place all translations files in this folder. for example for french it will be line fr_FR.csv and add french translation against english text.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.