WPML defines constants that you can use go get the current language:
ICL_LANGUAGE_CODE
– current language code (eg: en,fr,sp).ICL_LANGUAGE_NAME_EN
– Name of the current language in English (eg: English, French. Spanish).ICL_LANGUAGE_NAME
– Name of current language, in the current language (eg: English, Français, Español).
Related Posts:
- wp_pagenavi function parameters [closed]
- WPML – Change the language of large number of posts
- Cannot use object of type WP_Error as array
- Change ICL_LANGUAGE_CODE for WPML
- WPML – Pages not synced?
- WPML returning posts that are not published
- WPML: WP_Query + suppress_filters not working
- Translate front page (WPML) [closed]
- WPML translate without duplicating post [closed]
- WPML – Filter by individual or all languages
- Cannot locate specific link/string using String Translation with WPML? [closed]
- WPML custom post type – not translated
- wpml and languages with different directions
- Redirect user based on his language and country using WPML [closed]
- How to Automatically jump to the corresponding language of the page using WPML plugin in wordpress
- Translate Woocommerce automated emails
- Translation of one of the languages is not displayed on the site
- Latest WPML updates broke my wordpress post categories and menus [closed]
- WPML Translate term meta not synced
- WordPress Popular Posts with WPML
- How to configure the request language WP_Query wpml
- WPML with WP_Query serving up all 3 languages [closed]
- [Plugin WPML] : How to create a translation of a post using the WPML API?
- Gettext details
- Custom Post Type With Different Views
- Rewrite url for custom post type
- Checking current language in a function
- WPML Get url without outputting
- Need to give custom page template for each language in WPML
- How To Write An Inner Join With WP Query
- Make theme translatable for WPML
- Why isn’t WMPL correctly redirecting users based on browser language? [closed]
- Created pages not showing up in ‘All Pages’ list
- Woocommerce and different checkout field for different countries
- Find proper “text domain” within theme
- Fetch ID’s associated with a custom post type when translated with WPML?
- Should I include colon in my msgid in PO file?
- WPML custom string translation get outside of container
- WPML – Set language of inserted post
- Default string not appearing want to translate
- WPML Default Language User Meta [closed]
- category filter doesn’t work in WPML
- WordPress Blank Screen Issue [closed]
- Category applied to pages, creates multiple breadcrumb entries after a search query (On the translated site)
- Custom rewrite rules not working with WPML
- x-wp-nonce across domains
- How to Translate a string of an array inside a class?
- How to translate WordPress Emails?
- Country switcher, then option to choose language for that country [closed]
- Specific content by country in multiple languages
- Fixed values for same post translations
- Copying database tables to new database
- Hook in to add new post link wp admin?
- WPML – 404 Error when I try to pass GET parameters in my “different languages in directories” installation
- Error when upload images larger than 1024px [closed]
- Using Variable in WordPress Translate Functions
- Why template_include filter does not work with WPML plugin?
- WPML best page selector with php
- Where are comment ratings stored?
- Make dynamic string translatable
- How to migrate Custom Field Template to a WordPress Multisite
- ACF Content with WPML not saving [closed]
- Changing the header image using WPML
- Get all content on a “single page” site depending on language
- Internationalize plugin so strings can be translated in WPML [closed]
- Translate custom template with WPML
- How to create posts or pages with the names in wordpress?
- WPML taxonomies not translated
- Page not visible in ‘All pages’ after being added through PHP
- Making WP theme / plugin multii-lingual without plugins
- Custom Enfold theme tab layout not compatible with WPML
- Structure of multilingual and multiregional directory listing website for translation
- get_posts function not returning any results
- Woocommerce product query not working in other WPML languages
- WPML – Stop language redirection in initial load
- Default media uploader is not showing in wordpress website
- How to change the canonical link from a category or taxonomy archive?
- Change WooCommerce currency programmatically on AJAX request
- WPML – Hook when language is switched (change user language)
- Bulk assign posts to a category using SQL (MySQL)
- Permalinks don’t update nor link properly
- Custom Post Type slug and WPML gets 404 error
- Creating multilingual glossary for WP
- Site doesn’t work when updating to SSL using nginx
- WPML CMS Nav and Custom Nav_Walker Undefined Property Notices [closed]
- WPML – Change media uploader language
- CSS/JS is not working in multi lang installation
- WPML – Auto Duplicate Post Issue
- Theme RTL semi work but with “?rtl=1” fully work
- Blog switch wpml string translation (multi-site)
- Theme isn’t multilanguage ready. How can i still add a second language to the site?
- Wpdb empty result only if language is Russian
- Fetch data from another site, but the same database
- Translate placeholder text in search field
- How to get shared CSS body class between translated WPML pages [closed]
- How to write inner join using posts_clauses?
- Fatal Error WordPress Custom Post Type UI + WPML
- Taxonomy page wpml dropdown not working
- Translate Woocommerce tab
- Development time to Install and Configure WPML (https://wpml.org/) [closed]