Skip to content

mircobabini/wpml-shortcodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WPML Shortcodes

Adds shortcodes to the WPML environment, like wpml__, wpml_e and more. Makes WP full WPML ready.

Description

Adds the wpml__ and wpml_e functions to your theme and the wpml__ shortcode to your WordPress website. Make your WordPress full WPML ready!

<?php wpml__( $text, $context ); ?>
<?php wpml_e( $text, $context ); ?>

Similarly to the behaviour of the __, _e functions, you must provide a string to make translateable and a context. That’s it; just provide translations from the WPML > String Translations admin panel.

Check how to use the shotcode below.

Usage (via code)

<h1><php echo wpml__( 'Title', 'wpmlshortcodes' ); ?></h1>
<h2><?php wpml_e( 'Subtitle', 'wpmlshortcodes' ); ?></h2>

Usage (via shortcode)

<h1>[wpml__ context=wpmlshortcodes]Title[/wpml__]</h1>
<h2>[wpml__ context=wpmlshortcodes]Subtitle[/wpml__]</h2>

Contribute

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

Installation

Simply search for ‘WPML Shortcodes’ in the Plugins Admin page, then install and activate it. That's it!

Credits

Developed by Mirco Babini (Web Developer & Mobile App Developer), CEO @ SED Web

License: GPLv2 or later

Releases

No releases published

Packages

No packages published

Languages