This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.


This topic contains 2 replies, has 2 voices.

Last updated by bartU-2 1 year, 1 month ago.

Assigned support staff: Noman.

Author Posts
April 22, 2019 at 2:08 pm #3656247



I have a theme, with different option fields, in which I can input text.

I need one field, to be able to contain two languages at the same time:

[wpml_language language=”en”]Free shipping [/wpml_language]
[wpml_language language=”nl”]Gratis verzending[/wpml_language]

I find it confusing, that we have to look in the gigantic haystack, to hope to find that one string and translate it.
It would be more user-friendly, just to add the languages in one field if I choose to.
With qTranslate such efficiënt conditional languages shortcodes are possible.

I tried this plugin, but it does not work :

April 22, 2019 at 3:16 pm #3656641


Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)


Thank you for contacting WPML Support.

- You can achieve it using built in WPML shortcode and WPML String Translation plugin:

[wpml-string context="my-domain" name="my-name"]My string[/wpml-string]

Here is doc for more details:


- You can achieve it using custom shortcode as follows:

1. Please add this function in your theme’s or child theme functions.php file

add_shortcode( 'wpml_language', 'wpml_language_func');
function wpml_language_func( $attr, $content = null ){
        'language' => '',
    ), $attr));
    $current_language = ICL_LANGUAGE_CODE;
    if($current_language == $language){
        $output = do_shortcode($content);
    return $output;

2. Then use below shortcodes in your post/pages where you want:

[wpml_language language="en"]Free shipping [/wpml_language]
[wpml_language language="nl"]Gratis verzending[/wpml_language]

I hope it helps,

Thank you

April 22, 2019 at 3:27 pm #3656665


Works like a charm Norman, you genius !
Thanks man 🙂