I'm quit new to Magento 2. My questions is how do I translate my theme and other parts of my shop? I'm using the Dutch tranlation for Magento itself but still the theme needs to be translated. What it the easiest way and how can I keep my translation save for future updates?
You have to just create nl_NL.csv file into your theme i18n folder.
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,
$.mage.__('') function when adding a string:
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 !
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.
Sure , Not an issue ! try it and let us know if you still have any issue on the same