BACK TO DIRECTORY

WPML Translate Shortcode

by Mirco Babini

5.0
(6 ratings)

Adds the wpml_translate shortcode to your shortcode suite. You can also use the wpml_text_if_language( $lang, $content ) in your php code.

Usage (via code)

echo wpml_text_if_language( ‘en’, ‘Text’ ); echo wpml_text_if_language( ‘it’, ‘Testo’ );

Usage (via shortcode)

[wpml_translate lang=’en’]Text[/wpml_translate][wpml_translate lang=’it’]Testo[/wpml_translate]

Alias

  • wpml_language is an alias for wpml_translate shortcode
  • code and language are alias for lang attribute

Contribute

If you wanna contribute, pull requests on github.com.

Developed by Mirco Babini, WordPress Consultant, Web Developer and Data Lover.

Plugin Details

Active Installs
100
Total Downloads
11,313
Version
1.0.1
Requires WP
2.8
Requires PHP
Tested Up To
3.7.41
Added
2014-02-26
Last Updated
2016-03-04 9:28pm GMT

Ratings

5
6
4
0
3
0
2
0
1
0