Hi Craig,
What does the var_dump(get_locale()); return on this post/page?
Are you trying to use this shortcode in a post/page or in a PHP code?
If it’s a page/post, do you possibly try to use it in a page/post that’s not the Spanish version of the post/page?
Hi – sorry for the delay in getting back to you, was pulled onto another project.
When I execute var_dump_(get_locale()); it returns: string(5) “en_US”.
So, I’ve used the shortcode: [smartslider3 slider=”71″ lang=es_ES] without success.
On the page, I am using 2 slider shortcodes (one for desktop the other for tablet/mobile), then I was adding the 3rd slider shortcode, it looks like so:
[smartslider3 slider=”3″]
[smartslider3 slider=”12″]
[smartslider3 slider=”71″ lang=es_ES]
When I go to the spanish site, the slider is still returning slider “3” and not slider “71”.
Any ideas? thanks!
Plugin Support
Laszlo
(@laszloszalvak)
Hi @craigaznmedia
If var_dumping the locale returns en_US then that means you are currently inspecting the english version of the site, where it is the intended behavior that the shortcode:
[smartslider3 slider=71 lang=es_ES]
won’t display a slider, as the “lang=es_ES” shortcode parameter will only make the slider with the ID 71 displayed if the locate is indeed es_ES.
Anyways, as far as I know WPML works that way, that you need to create different versions of the same page.
E.g. let’s say you have an “About” page in English:
-then you will need to go to Pages > All pages, then find the “About” page and click on the “+” icon under the Spanish flag ( when you hover over the + icon it should say something like “Add translation to Spanish” ).
In the English version of the “About” page you need to publish the slider where you have the english text.
In the Spanish version of the “About” page you need to publish the other slider where you have the spanish text.
So to sum things up:
-if you publish the slider to a page, you don’t really need to use the “lang” parameter of the shortcode, you just need to place the shortcode like: [smartslider3 slider=71]
-in the english version of the page, you need to publish the slider with the english text
-in the spanish version of the page, you need to publish the slider with the spanish text
If the slider still won’t show up, then please get in touch with use directly over the ticket system: https://smartslider3.com/contact-us/support/?ref=https://ww.wp.xz.cn/support/topic/language-string/
and we will check this problem.
Best regards,
Laszlo.