Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2018
    Posts
    121
    Plugin Contributions
    0

    Idea or Suggestion How to automatically switch languages and currencies

    How to make the website automatically switch languages and currencies according to the client's browser or IP.
    I saw the Settings in the background, but I tested that the automatic switch could not be achieved.
    Are there any plugins that can make things happen quickly?

    Name:  QQ截图20190731222658.jpg
Views: 219
Size:  16.4 KB

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How to automatically switch languages and currencies

    If your store has languages defined that match the customer's browser, then you can configure that language with a default currency to be chosen.

    See https://www.zen-cart.com/showthread....and-currencies
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Apr 2018
    Posts
    121
    Plugin Contributions
    0

    Default Re: How to automatically switch languages and currencies

    Quote Originally Posted by DrByte View Post
    If your store has languages defined that match the customer's browser, then you can configure that language with a default currency to be chosen.

    See https://www.zen-cart.com/showthread....and-currencies
    define('LANGUAGE_CURRENCY', 'EUR');
    Are you talking about this? Every language has this definition.
    The system still can't switch languages or currencies by itself.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How to automatically switch languages and currencies

    Consider this scenario:

    Your store is in England, so your default language is English, and your default currency is GBP.

    You also sell to customers in France, so you add the French language to your store, and you add the EUR currency.

    Then you edit the French language file and set the define for LANGUAGE_CURRENCY to 'EUR',
    and back in your English language file you set the define for LANGUAGE_CURRENCY to 'GBP'.
    Then in your Admin->Configuration->My Store, you set Switch To Default Language Currency to true.

    Now when a customer intentionally selects French by choosing the language from your language picker, the store will also switch to EUR currency when showing the store pages in French. And when they choose English it will switch back to GBP.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Apr 2018
    Posts
    121
    Plugin Contributions
    0

    Default Re: How to automatically switch languages and currencies

    Quote Originally Posted by DrByte View Post
    Consider this scenario:

    Your store is in England, so your default language is English, and your default currency is GBP.

    You also sell to customers in France, so you add the French language to your store, and you add the EUR currency.

    Then you edit the French language file and set the define for LANGUAGE_CURRENCY to 'EUR',
    and back in your English language file you set the define for LANGUAGE_CURRENCY to 'GBP'.
    Then in your Admin->Configuration->My Store, you set Switch To Default Language Currency to true.

    Now when a customer intentionally selects French by choosing the language from your language picker, the store will also switch to EUR currency when showing the store pages in French. And when they choose English it will switch back to GBP.
    Can't judge it by browser language?
    Do language and currency switching require a manual click from the customer to achieve this?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How to automatically switch languages and currencies

    Quote Originally Posted by jiji2018 View Post
    Can't judge it by browser language?
    Yes. The other setting you quoted above offers "Browser" as another setting, where it will determine the visitor's language from their browser settings.
    Not all browsers supply the right information, and not all customers have selected the language you might think they would.
    But if there's a match, it will automatically switch them on their first visit to your site. After that first visit, they can change the language manually.

    Admin->Configuration->My Store->Language Selector -> Browser.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Remove Languages/Currencies and add Search Header
    By suehigman in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 8 May 2011, 07:38 PM
  2. removing languages and currencies from header
    By kevnj in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 14 Jan 2011, 05:19 PM
  3. How do I change banner images when I switch languages?
    By chay in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Oct 2009, 09:59 PM
  4. Languages and currencies
    By shocker in forum Addon Language Packs
    Replies: 1
    Last Post: 24 Oct 2008, 09:19 AM
  5. Languages and Currencies in header.
    By linkedla in forum Basic Configuration
    Replies: 2
    Last Post: 1 Jun 2006, 09:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR