2

When I open my .co.uk website, it says a lot of stuff in Dutch from the pack I installed. I want my German website to be German, Dutch to be Dutch and English to be English.

Why it is not working?

How can I fix this?

I don't know from where to start.

My website:

https://www.thefixedgearshop.co.uk

The storeviews: Storeviews

Not switchable

Locale not switchable

3
  • it seems like Dutch and German have so many similarities. From where you got the language pack? Commented Mar 1, 2018 at 5:06
  • When I opened the site in chrome instead of German it is showing as Afrikaans. Please share the language pack details if possible. Commented Mar 1, 2018 at 5:55
  • The one language pack (NL) is imported from here: github.com/ho-nl/magento2-nl_NL but the english and German one are not imported in their and come from the Magento Install. Can you inform me how we should proceed and why does English after the import of NL show NL language? Commented Mar 1, 2018 at 8:17

1 Answer 1

3
+25

Personally I think the package that you have installed is a little mixed, try please to disable your translation modules and create three new by following and you can later customize them if necessary.

Nb: Regarding the translation files before adding them to the module, you have to check them first and make sure that they don't contain a mixture of languages.

Set well the right language for each store in admin panel.

Here is the method for one module, do that for the other by changing the code_ISO language !

  1. app/i18n/languageName/code_ISO/code_ISO.csv

    Exemple: for the French language it will be like this: app/i18n/french/fr_FR/fr_FR.csv

    • You put your translation words inside fr_FR.csvlike this :

    "Hello","Bonjour"

    • You can specify the translation for some module like this, exemple here is a captcha module "Incorrect CAPTCHA","CAPTCHA incorrect",module,Magento_Captcha
  2. app/i18n/languageName/code_ISO/language.xml

    <?xml version="1.0"?>
    <language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
        <code>code_ISO</code>
        <vendor>languageName</vendor>
        <package>code_iso</package>
    </language>
    

    French language exemple: app/i18n/french/fr_FR/language.xml

    <?xml version="1.0"?>
    <language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
        <code>fr_FR</code>
        <vendor>french</vendor>
        <package>fr_fr</package>
    </language>
    
  3. app/i18n/languageName/code_ISO/registration.php

    <?php
        \Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::LANGUAGE,
        'languageName_code_iso',
        __DIR__
    );
    

    French language exemple: app/i18n/french/fr_FR/registration.php

    <?php
        \Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::LANGUAGE,
        'french_fr_fr',
        __DIR__
        );
    
  4. Clean your cache, deploy the static-content like this :

    • Delete the contents of pub/static except .htaccess
    • Delete the contents of var/cache
    • Delete the contents of var/view_preprocessed
    • Run this command:
      php bin/magento setup:static-content:deploy -f
8
  • Thank you, this looks promising and I will try asap. I noticed that the locale language on the website for english is set to Dutch (Netherlands, but I cannot edit this. The uncheck box for Use Website is not clickable. How do I solve this? That could be the reason it's dutch right? Commented Mar 5, 2018 at 20:24
  • I you want to have different languages for one website, you have to create other storeview and you set the right language for each store view. however if you want to have different languages for different websites, you just have to create one store and one storeview then you the right language for each. for more information : magento.stackexchange.com/a/98307/48355
    – PЯINCƎ
    Commented Mar 5, 2018 at 21:35
  • I have this set-up already. See the new picture in the first question. I am switching to this storeview (english for instance, but cannot switch (photo edit 2) to this locale. Commented Mar 5, 2018 at 21:47
  • Even if you uncheck the checkbox it doesnt work ?
    – PЯINCƎ
    Commented Mar 5, 2018 at 21:54
  • I cannot uncheck the box, it's grayed out. Commented Mar 5, 2018 at 22:04

Your Answer

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

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