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

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

                    Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                    Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?