Introduction
The WPML Language shortcode allows you to show specific content dependent on which language is selected for the site. This allows you to show different content to different users by the language that is set.
In order for this shortcode to work, you have to have the WPML WordPress plugin installed and activated.
WPML Language examples
[intense_wpml_language language=”en”]
[intense_alert color=”error” font_color=”#ffffff” border_radius=”5px” block=”1″]
This alert is shown only when the selected language is English.
[/intense_alert]
[/intense_wpml_language]
[intense_wpml_language language=”fr”]
[intense_alert color=”error” font_color=”#ffffff” border_radius=”5px” block=”1″]
This alert is shown only when the selected language is French.
[/intense_alert]
[/intense_wpml_language]
Explore More Shortcodes
- Alert
- Animated Popular
- Animated Image
- Animated Scroll New
- Audio
- Badge
- Blockquote
- Blog
- Blur New
- Books
- Button
- Chart
- Clients
- Code
- Collapsibles
- Content Box
- Content Section Popular
- Counter
- Coupons
- Custom Post Type
- Definitions
- Device Mockups
- Divider Popular
- Dropcap
- Emphasis
- Events
- FAQ
- Filler
- Flip Box Popular
- Fullscreen Video
- Gallery Popular
- Google Docs Viewer
- Guests
- Heading
- Highlight
- Hover Box
- Horizontal Ruler
- Icon Popular
- Icon List
- If New
- Image
- Image Compare
- Jobs
- Label
- Lead
- Lightbox
- Locations
- Map
- Masonry
- Members
- Menu
- Post Meta Data
- Movies
- Music
- News
- Overlay Popular
- Panel New
- Parallax Scene Popular
- Permalink
- Person
- Popover
- Portfolio
- Post Fields
- Post Media
- Pricing Table
- Progress
- Project
- Promotional Box
- QR Code
- Quotes
- Recent Books
- Recent Clients
- Recent Coupons
- Recent Events
- Recent Jobs
- Recent Locations
- Recent Movies
- Recent Music
- Recent News
- Recent Portfolios
- Recent Posts
- Recent Projects
- Recent Quotes
- Recent Recipes
[intense_content_section]
<h2>Introduction</h2>
The WPML Language shortcode allows you to show specific content dependent on which language is selected for the site. This allows you to show different content to different users by the language that is set.
In order for this shortcode to work, you have to have the <a href="https://wpml.org/" rel="noopener" target="_blank">WPML WordPress plugin</a> installed and activated.
[/intense_content_section]
[intense_content_section background_type="color" background_color="#f9f9f9" border_top="1px solid #ededed" border_bottom="1px solid #ededed"]
<h2>WPML Language examples</h2>
[intense_row padding_top="0"]
[intense_column size="12" medium_size="12"]
The following shortcodes are coded so that they do not actually run, as WPML is not currently installed.
[/intense_column]
[/intense_row]
[intense_row padding_top="20"]
[intense_column size="6" medium_size="6"]
The following shortcode will show the alert shortcode only if the selected language is English.
[intense_spacer type="block" height="20"]
[intense_wpml_language language="en"]
[intense_alert color="error" font_color="#ffffff" border_radius="5px" block="1"]
This alert is shown only when the selected language is English.
[/intense_alert]
[/intense_wpml_language]
[/intense_column]
[intense_column size="6" medium_size="6"]
The following shortcode will show the alert shortcode only if the selected language is French.
[intense_spacer type="block" height="20"]
[intense_wpml_language language="fr"]
[intense_alert color="error" font_color="#ffffff" border_radius="5px" block="1"]
This alert is shown only when the selected language is French.
[/intense_alert]
[/intense_wpml_language]
[/intense_column]
[/intense_row]
[/intense_content_section]
[intense_snippet snippet_id="Child Theme | Shortcodes/footer" snippet_title="Shortcode Page Footer"]