- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm using the Dutch tranlation for Magento itself but still the theme needs to be translated. I used the CVS way to translate the theme? I was wondering if there is a faster way to tranlate the theme?
Regards Rob
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to just create nl_NL.csv file into your theme i18n folder.
app/design/frontend/{Vendorname}/{themename}/i18n/nl_NL.csv
Check links,
https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/translations/translate_theory.html
You can translate string inside template file using php,
<?php __('translate word');?>
You can translate knockout js file using i18n,
<span data-bind="i18n: 'Sign In'"></span>
You can translate xml using translate="true",
<item name="label" xsi:type="string" translate="true">Delete</item>
For js file translation,
Use the $.mage.__('')
function when adding a string:
https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/translations/xlate.html
https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/translations/translate_practice.html
Magento 2 Blogs/Tutorial
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to just create nl_NL.csv file into your theme i18n folder.
app/design/frontend/{Vendorname}/{themename}/i18n/nl_NL.csv
Check links,
https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/translations/translate_theory.html
You can translate string inside template file using php,
<?php __('translate word');?>
You can translate knockout js file using i18n,
<span data-bind="i18n: 'Sign In'"></span>
You can translate xml using translate="true",
<item name="label" xsi:type="string" translate="true">Delete</item>
For js file translation,
Use the $.mage.__('')
function when adding a string:
https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/translations/xlate.html
https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/translations/translate_practice.html
Magento 2 Blogs/Tutorial
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Translate parts of shop and theme
Hi @Jojobaa
If you wanted to make your shop front in Dutch language - then First you need to installed Dutch language translation package(Ignore if you have already installed) !
How to install dutch language translation package , follow this link - https://www.mageplaza.com/magento-2-dutch-language-pack.html
so automatically - few translation will be covered by installing this package !
Few translations are still missing which you have added as custom - so for that you need to override this language pack in your custom theme here is the full path - app/design/frontend/VENDORNAME/THEMENAME/i18n/nl_NL.csv
So add the rest of the translations over here , run deploy command again and check it will works !
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Translate parts of shop and theme
Ok thanks I will look into this. I'll let you guys know if I still have some questions ;-). So far, thanks for the support.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Translate parts of shop and theme
Hi @Jojobaa
Sure , Not an issue ! try it and let us know if you still have any issue on the same
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Translate parts of shop and theme
Is there maybe an example file on how to stranslate for a theme? How does this work and look exactly?
For the Dutch Magento 2 translation I have the honl/mc-magento2 module installed. Is this the correct way to set Magento 2 in Dutch?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Translate parts of shop and theme
You just need to create i18n folder in your theme root folder,
Create nl_NL.csv file and create two columns, one column with original text and second column with your translated text.
Run deploy command and check your changes.
Magento 2 Blogs/Tutorial
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Translate parts of shop and theme
If I do this will that overide my honl/mc-magento2 Dtuch tranlation module? Because I only want to translate some parts of the frontend and keep the honl/mc-magento2 module.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Translate parts of shop and theme
By default magento gives Dutch translation with its setup so you dont need to add any third party library for dutch translation. You just need to create nl_NL.csv file and run deploy command.
Magento 2 Blogs/Tutorial
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Translate parts of shop and theme
My theme pad is /html/app/design/frontend/Alothemes. Inside this pad are more versions of the theme. Where should I create the nl_NL.csv file. And what does it mean to use the deploy command? And if I installed the nl_NL.csv file I can remove the module translation and add the missing theme tranlations to the nl_NL.csv file?