Magento 2 language changes not working properly, Only works for first time when i switchfooter links multilinguallanguage is reset to default on any new page loadRemove multi-language storeview code from the url - Magento1.9Having problem with multi languages store in magento2“Add to Cart” not working after moved local server to live server in Magento 2“Delete operation is forbidden for current area” error while create customer in Magento 2Store switch is not working for custom categoriesHow to set a fallback to English for non-existing language in Magento 2?How to set Direction RTL for PDF invoices Magento 2?Magento 2 - How to change Mega Menu sort order in store views alphabetical for each store view?

DBCC checkdb on tempdb

How would modern naval warfare have to have developed differently for battleships to still be relevant in the 21st century?

Dates on degrees don’t make sense – will people care?

Confusion over 220 and 230 volt outlets

How large would a mega structure have to be to host 1 billion people indefinitely?

CircuiTikZ: Start ground relative to the closest component

Can Ogre clerics use Purify Food and Drink on humanoid characters?

UK - Working without a contract. I resign and guy wants to sue me

How to remove this component from PCB

Is there a term for the belief that "if it's legal, it's moral"?

What can I do with a research project that is my university’s intellectual property?

Android Material and appcompat Manifest merger failed in react-native or ExpoKit

Should an enameled cast iron pan be seasoned?

Count All Possible Unique Combinations of Letters in a Word

Do I have any obligations to my PhD supervisor's requests after I have graduated?

Does Doppler effect happen instantly?

Helping ease my back pain by studying 13 hours everyday , even weekends

Is "Busen" just the area between the breasts?

What are Elsa's reasons for selecting the Holy Grail on behalf of Donovan?

Does a vocal melody have any rhythmic responsibility to the underlying arrangement in pop music?

Cut the gold chain

Can White Castle?

How do I farm creepers for XP without them exploding?

How do I professionally let my manager know I'll quit over an issue?



Magento 2 language changes not working properly, Only works for first time when i switch


footer links multilinguallanguage is reset to default on any new page loadRemove multi-language storeview code from the url - Magento1.9Having problem with multi languages store in magento2“Add to Cart” not working after moved local server to live server in Magento 2“Delete operation is forbidden for current area” error while create customer in Magento 2Store switch is not working for custom categoriesHow to set a fallback to English for non-existing language in Magento 2?How to set Direction RTL for PDF invoices Magento 2?Magento 2 - How to change Mega Menu sort order in store views alphabetical for each store view?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Languages not switching properly. Only works when language parameter www.website.com/?___store=german exits into the url but when i click on the other pages then usually parameter will be removed from url then it's not working.



Any idea guys ?



Thanks in advance!










share|improve this question




























    0















    Languages not switching properly. Only works when language parameter www.website.com/?___store=german exits into the url but when i click on the other pages then usually parameter will be removed from url then it's not working.



    Any idea guys ?



    Thanks in advance!










    share|improve this question
























      0












      0








      0








      Languages not switching properly. Only works when language parameter www.website.com/?___store=german exits into the url but when i click on the other pages then usually parameter will be removed from url then it's not working.



      Any idea guys ?



      Thanks in advance!










      share|improve this question














      Languages not switching properly. Only works when language parameter www.website.com/?___store=german exits into the url but when i click on the other pages then usually parameter will be removed from url then it's not working.



      Any idea guys ?



      Thanks in advance!







      magento2 session language






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 8 '18 at 11:24









      Indranil MaityIndranil Maity

      1088




      1088




















          1 Answer
          1






          active

          oldest

          votes


















          0














          This is a know Magento bug in version 2.2.0 and 2.2.1 (probably 2.1.X as well).



          It has been fixed in v. 2.2.2. so you should upgrade.



          As a "quick fix", you can change the core file in /vendor/magento/module-store/block/Switcher.php



          Change the function getTargetStorePostData() to:



          public function getTargetStorePostData(MagentoStoreModelStore $store, $data = [])

          $data[MagentoStoreApiStoreResolverInterface::PARAM_NAME] = $store->getCode();
          return $this->_postDataHelper->getPostData(
          //$store->getCurrentUrl(false),
          $this->getUrl('stores/store/switch'),
          $data
          );






          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f208498%2fmagento-2-language-changes-not-working-properly-only-works-for-first-time-when%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            This is a know Magento bug in version 2.2.0 and 2.2.1 (probably 2.1.X as well).



            It has been fixed in v. 2.2.2. so you should upgrade.



            As a "quick fix", you can change the core file in /vendor/magento/module-store/block/Switcher.php



            Change the function getTargetStorePostData() to:



            public function getTargetStorePostData(MagentoStoreModelStore $store, $data = [])

            $data[MagentoStoreApiStoreResolverInterface::PARAM_NAME] = $store->getCode();
            return $this->_postDataHelper->getPostData(
            //$store->getCurrentUrl(false),
            $this->getUrl('stores/store/switch'),
            $data
            );






            share|improve this answer



























              0














              This is a know Magento bug in version 2.2.0 and 2.2.1 (probably 2.1.X as well).



              It has been fixed in v. 2.2.2. so you should upgrade.



              As a "quick fix", you can change the core file in /vendor/magento/module-store/block/Switcher.php



              Change the function getTargetStorePostData() to:



              public function getTargetStorePostData(MagentoStoreModelStore $store, $data = [])

              $data[MagentoStoreApiStoreResolverInterface::PARAM_NAME] = $store->getCode();
              return $this->_postDataHelper->getPostData(
              //$store->getCurrentUrl(false),
              $this->getUrl('stores/store/switch'),
              $data
              );






              share|improve this answer

























                0












                0








                0







                This is a know Magento bug in version 2.2.0 and 2.2.1 (probably 2.1.X as well).



                It has been fixed in v. 2.2.2. so you should upgrade.



                As a "quick fix", you can change the core file in /vendor/magento/module-store/block/Switcher.php



                Change the function getTargetStorePostData() to:



                public function getTargetStorePostData(MagentoStoreModelStore $store, $data = [])

                $data[MagentoStoreApiStoreResolverInterface::PARAM_NAME] = $store->getCode();
                return $this->_postDataHelper->getPostData(
                //$store->getCurrentUrl(false),
                $this->getUrl('stores/store/switch'),
                $data
                );






                share|improve this answer













                This is a know Magento bug in version 2.2.0 and 2.2.1 (probably 2.1.X as well).



                It has been fixed in v. 2.2.2. so you should upgrade.



                As a "quick fix", you can change the core file in /vendor/magento/module-store/block/Switcher.php



                Change the function getTargetStorePostData() to:



                public function getTargetStorePostData(MagentoStoreModelStore $store, $data = [])

                $data[MagentoStoreApiStoreResolverInterface::PARAM_NAME] = $store->getCode();
                return $this->_postDataHelper->getPostData(
                //$store->getCurrentUrl(false),
                $this->getUrl('stores/store/switch'),
                $data
                );







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 8 '18 at 12:54









                LezLez

                1,540731




                1,540731



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f208498%2fmagento-2-language-changes-not-working-properly-only-works-for-first-time-when%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form