From The WPML website:
http://wpml.org/documentation/support/wpml-coding-api/
Language constants
WPML defines the following constants which can be used in the theme:
Constant Description Example
ICL_LANGUAGE_CODE Code for the current language fr
ICL_LANGUAGE_NAME Name of current language, in the current language Français
ICL_LANGUAGE_NAME_EN Name of the current language name in English French
Related Posts:
- Best way to do multiple constructors in PHP
- Is there a way for a plugin to add an attribute to the tag of a theme?
- Moving a PHP web-app to WordPress
- How to use multiple query with same meta key
- How to use WordPress (PHP) functions in AngularJS partials files?
- How to Remove a Filter from the Admin List Table?
- WordPress 4 invalid username special charachters issue
- Remove commas from WooCommerce checkout addresses fields
- Concatenate site_url and string doesn’t work
- Use ajax to update_post_meta
- When did wordpress switched requirements to php7?
- 1+1 php counter inside the update_post_meta
- echo CHILD / SUB CATEGORIES of the CURRENT CATEGORY only
- How to display user nickname (not display name) in PHP template?
- Extract subdomain and relative address from a url
- Custom Template 404 for specific custom post type
- Correct syntax to html php conversion
- Accessing site’s root from themes folder
- Different output from WP-CLI in bash vs PHP exec()
- wp_remote_get adding backslashes
- hook that when page is starting to load
- Theme Options Page – User Updates Logo
- How do I use this PHP library to access OpenGraph data in a child theme?
- How to exclude category ID from Looper in WordPress
- Custom user login page by creating a plugin
- Add a specific part of current category page url to shortcode
- Woocommerce product variation backorder
- Why ajax doesn’t work on certain wordpress hooks?
- Whitelisting items from custom options page
- Add_menu_page not displaying the menu in class based plugin
- Approve post and send the password
- Print last modified date only on posts
- Cannot execute php files in wp-content
- How to Create a Subscribeable News Feed?
- Generate sidebar depending on height of post
- Get author and excerpt from URL
- Sidebar not appearing in footer, but it appears everywhere else!
- How to create table in wordpress without plugin? [closed]
- Why is my str_replace not working on short code submitted by front-end?
- Skip foreach loop
- Javascript not loading on certain page
- How do you create two separate Register pages?
- $_GET[‘updated’] does not work in WordPress 3.1?
- Include only posts with meta key “add_in_rss” in RSS Feed
- SOAP Request/Parsing XML From wp_send_json_success
- List post by title length
- get db values for external js file
- How to exclude a widget from W3 Total Cache Plugin
- Can we stop session reset if page reloads?
- Display WordPress Post on A Different Site
- WordPress the_content Page Load
- Add row to custom database Table and delete all rows older than 1 day
- How to split AJAX response into two divs
- Deleting expired session tokens in WordPress
- How to set variables with AJAX request to use in another function in WordPress
- How to hide the file name of 404.php in URL?
- when hooking to pre_user_query my wordpress crashes when using very simple commands?
- Hide publish date when update date
- I am having errors with checkout on wordpress
- Display articles with a different template in the home page | Solved |
- How to use Multi SQL Database in WordPress?
- Category Page Displaying all Pages
- problem connecting to the administrator
- Help me understand how Search function works using dynamic_sidebar()
- Looping through dummy posts and showing them in the main index.php
- How to display post meta bellow every posts
- Sudden Upload HTTP errors, PHP uploads and memory limits are already to high to my taste. Anything else?
- form submission reverts to index.php template
- Hide a specific category title from displaying on site
- How to change the structure/order of sections in a WordPress theme? [closed]
- WordPress mysql deos not work with php7
- i want add conditional for add category in wordpress
- Return to the beginning of the results of a for loop
- Need help with AJAX login to call php in functions.php to handle redirects based on user cap (role)
- Thumbnail wouldn’t scale to size properly
- Scheduling a post using publish date from a custom field. Resulting post is set as published in the future instead of scheduled
- PHP script to redirect traffic based on website accessed
- How to remove title tag with this filter
- Real time notification on user profile after new comment
- PHP – Woocommerce 3.2 Add variable shipping insurance with multiple “else if ” conditions
- Shortcode Works for Logged in Users but Not Working for Guest
- Fix mod_pagespeed Fetch timed out error on bitnami AWS wordpress installation
- ACF Images If/else
- Adding my own custom template page but got white page
- How to get the first letter from custom field?
- Meta box not saving spaces
- problem multisite with blog id
- A Space being added to url generated by custom plugin
- Attachments doesn’t update
- Why this plugin is not working?
- wp_customize_image_control default value
- WordPress will suddenly stop saving files uploaded by my code (ran in nopriv ajax)
- Adding javascript files to WordPress and jQuery version
- check if .min.css stylesheet exists
- How do I use CSS or PHP to customize WordPress Form Manager Plugin Table?
- How to execute add_action() function from custom plugin to Crontrol plugin or do_action()?
- Incomplete term slugs output from a foreach loop with get_the_terms
- Custom Shortcode with Dynamic Button
- Pull GET parameter from URL in functions.php
- problem with php function error