Holiday Deals are Here!

UP TO

35%

Discounts

Ending in:

Get Yours Now!
wpmet-website-logo
  • Home
  • Plugins
    • ElementsKit
    • ShopEngine
    • GetGenie AI
    • MetForm
    • WP Social
    • WP Fundraising
    • Wp Ultimate Review
  • About
  • Blog
  • Support
  • Contact
  • My Account
wordpress plugin
Popular Search headermenumegafootermetform

Getting Started with ShopEngine

  • Getting Started
  • Enable All Widgets
  • Enable All Module
  • Getting started with ShopEngine RTL support
  • Guideline to Increase Your Server Performance by ShopEngine

ShopEngine Templates

  • Shop Page
  • Create Cart Page
  • Create Single Product Page
  • My Account Page
  • Create Checkout Page
  • Archive Page
  • Create Order/Thank You Page
  • Checkout Form – Billing
  • Order Thank You
  • Quick Checkout Template
  • Create Conditional Template
  • Empty Cart Template

ShopEngine Account Settings

  • My Account Page
  • Account Address
  • Account Dashboard
  • Account Navigation
  • Account Details
  • Account Order Details
  • Account Logout
  • Account Downloads
  • Account Form – Login
  • Account Form – Register

ShopEngine Modules

  • Quick View
  • Partial Payment
  • Flash Sale Countdown
  • Variation Swatches
  • Back-Order
  • Currency Switcher
  • Quick Checkout
  • Badges
  • Wishlist
  • Sales Notification
  • Preorder Module
  • Checkout Additional Field
  • Product Comparison
  • Sticky Fly Cart
  • Product Size Charts
  • Advanced Coupon
  • ShopEngine Vacation
  • Multistep Checkout
  • Cross Sell Popup
  • Avatar Module

ShopEngine General Widgets

  • Related Products
  • Product Rating
  • Product Excerpt
  • Additional Information
  • Order by Filter
  • Product Tabs
  • Product Meta
  • Product Tags
  • Product Stock
  • Breadcrumbs
  • Product Review
  • Recently Viewed Products
  • Add To Cart
  • Return To Shop
  • Currency Switcher
  • Product Image
  • Product Description
  • Product SKU
  • Order Confirm
  • Categories
  • Product Title
  • Order Details
  • Product Categories
  • Checkout Form – Payment
  • Checkout Form – Shipping
  • Product Category List
  • Filterable Product List
  • Product Share
  • Flash Sale Products
  • Checkout Form-Additional
  • Product Price
  • Empty Cart Message
  • Upsell
  • Cross-sell
  • My Account Orders
  • Product List
  • Thank You Address Details
  • Deal Products
  • Archive View Mode
  • Archive Description Widget
  • Archive Title Widget
  • Archive Products Widget
  • Archive Result Count
  • Cart Table Widget
  • Cart Total
  • Avatar Widget

ShopEngine Product widgets

  • Related Products
  • Product Rating
  • Product Excerpt
  • Product Tabs
  • Product Meta
  • Product Tags
  • Product Stock
  • Product Review
  • Recently Viewed Products
  • Product Image
  • Product Description
  • Product SKU
  • Product Title
  • Product Categories
  • Product Category List
  • Filterable Product List
  • Product Share
  • Flash Sale Products
  • Product Price
  • Product List
  • Products Per Page Filter
  • Deal Products
  • Advanced Search Widget

ShopEngine Archive Widgets

  • Product Filters
  • Archive View Mode
  • Archive Description Widget
  • Archive Title Widget
  • Archive Products Widget
  • Archive Result Count

ShopEngine Checkout Widgets

  • Checkout Form-Coupon
  • Checkout Form – Billing
  • Checkout Form – Payment
  • Checkout Form – Shipping
  • Checkout Form-Additional
  • Checkout- Order Review
  • Checkout Shipping Methods
  • Checkout Form Login

ShopEngine FAQ

  • ShopEngine FAQ

ShopEngine Support Hooks

  • Builder Templates Hooks
  • Theme Integration with ShopEngine

ShopEngine Gutenberg

  • ShopEngine Gutenberg Addon
  • ShopEngine Gutenberg Template
  • ShopEngine Gutenberg Modules

Multilingual Support - ShopEngine

  • Setup WPML and Translate WooCommerce Pages
  • WPML String Translation For ShopEngine
  • Multi-Language Templates with WPML
  • Multi-Language Templates with Polylang
  • ShopEngine Multilingual Hooks for Developers
  • Home
  • Doc
  • ShopEngine
  • Multilingual Support - ShopEngine
  • ShopEngine Multilingual Hooks for Developers

ShopEngine Multilingual Hooks for Developers

Table of Contents
  • Hook to set the user's current language code:
  • Hook to set all available languages:
  • Hook to get all the ShopEngine module settings:

ShopEngine comes with WPML and Polylang multilingual by default. However, if you want to use other multi-language plugins there are a bunch of hooks available for developers. The developers can customize the multilingual functionalities of ShopEngine using these hooks.

Hook to set the user’s current language code: #

Here is the hook to set users’ current language. You can use this hook to define the language that the website is currently using.

Here is the hook to set the user’s current language code:

add_filter('shopengine_language_code', function () {
        return 'bn';
    });

Hook to set all available languages: #

The following hook is for multi-language support. You can add the languages that your website supports using this hook.

In this array format, you will add the language code (language_code), name of the translated language (translated_name), and the country flag URL (country_flag_url). You must set the status to “true” under the lang_items array to enable multilingual support.

Here is the hook to set all available languages:

add_filter('shopengine_multi_language', function () {
        $languages = [
            'en' => [
                'language_code'    => 'en',
                'translated_name'  => 'United States English',
                'country_flag_url' => 'http://example.com/en.png'
            ],
            'bn' => [
                'language_code'    => 'bn',
                'translated_name'  => 'Bangla',
                'country_flag_url' => 'http://example.com/bn.png'
            ]
        ];
        return ['lang_items' => $languages, 'status' => true];
    });

Hook to get all the ShopEngine module settings: #

This action hook is used to get all the ShopEngine module settings on save. When users make any changes to any ShopEngine module, this action will be fired as soon as they save the changes. And the settings will be executed under the “$args” function.

Here is the action hook to get all the ShopEngine module settings on save.

  add_action('shopengine/core/settings/on_save', function ($args) {
        // execute your code
    });
shopEngine
What are your Feelings
Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Still stuck? How can we help?

How can we help?

Updated on November 1, 2022
Multi-Language Templates with Polylang
Table of Contents
  • Hook to set the user's current language code:
  • Hook to set all available languages:
  • Hook to get all the ShopEngine module settings:

Get Subscribed Today!

wpmet-website-logo
© 2022, Wpmet. All Rights Reserved. Built with ElementsKit.
Elements Kit
ShopEngine
GetGenie AI
Metform
WP Social
Wp Ultimate Review
Wp Fundraising
About us
Contact us
Support
Login/Register
Collaborate
Affiliates
Affiliate Area
Privacy Policy
Terms and Conditions
Refund Policy
Payment systems accepted by Wpmet

Wpmet is not affiliated with or endorsed by Open Source Matters or the WordPress Project. The CMS logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Opt out!.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
Vendor/Partner
SAVE & ACCEPT