does not translate Slideshow
-
Hi
Why this plugin content does not translate Slideshow
-
@labalab
What is plugin name for Slideshow?No plug-ins
Slideshow themes customizr does not translateI choose — Auto-generated slider from your blog posts — from customize front page.
also ‘creating new slider’ does not has translation option, (title limited to 80 char, so it’s not enough to write text for other languages.@labalab
You can use filter to get correct titleadd_filter( 'tc_posts_slider_title', 'wpglobus_slider_title', 10, 2 ); function wpglobus_slider_title( $title, $post_id ) { $title = get_post_field( 'post_title', $post_id ); return WPGlobus_Core::text_filter( $title, WPGLobus::Config()->language ); }
Moreover you can use filters ‘tc_posts_slider_text’ to get text,
‘tc_posts_slider_button_text’ to get button text.
Please see class-content-slider.php file of customizr theme.Thank you
@labalab
You are welcomeI hope it is ok that I reanimate this thread, as my problem is very similar.
I am sorry but I do not understand the solution with the filters as given above. Where am I supposed to add this piece of code?
My problem is just about the frontpage slider.
I tried the way as described here:
http://www.wpglobus.com/extensions-archive/multilingual-texts-in-wordpress-theme-options-panel/
First of all, as labalab said already, the customizr theme only allows 80 characters in the heading of the slider. So, with two language there is no space left already for a real heading, not to speak of more than two languages.
Anyway, I added tc_theme_options and theme_mods_customizr to the options to translate. It didn’t work. The problem seems to be, that the text that is displayed in the slide is not stored in those tables. In these tables, there is only the name of the slider not the text. In my case that name is “homepage”. So, as my last resort, I created two sliders and changed the option"homepage"
to"{:en}homepage{:}{:de}homepage-de{:}"
in the database directly with phpmyadmin. After that, all settings I ever made to the theme were set back, and my website now looks as it came out of the box.
So, no slider in two languages, and a website where I have to do the styling all over again. Please help.@archeryimages.net
Piece of code you must add to functions.php file of your active theme.
The text was taken from post_title field of wp_posts tableThanks for the fast response Alex! I tried that, but it seems to not change anything.
I finally found where the theme stores the content of the slider, in the fieldmeta_value
(meta_key
isslide_title_key
andslide_text_key
)in thewp_postmeta
table.
Is it somehow possible to let the “WPGlobus Translate Options” Plugin also translate this table?@archeryimages.net
You don’t need to use WPGlobus Translate option with wp_postmeta table.
In your case code isadd_filter( 'tc_posts_slider_title', 'wpglobus_slider_title', 10, 2 ); function wpglobus_slider_title( $title, $post_id ) { $title = get_postmeta( $post_id, 'slide_title_key', true ); return WPGlobus_Core::text_filter( $title, WPGLobus::Config()->language ); }
I tried that piece of code, but it doesn’t work. I opened a thread in the customizr forum, too. I mean, it seems like a theme problem and I hope they can solve it, I think I am not the only one with that problem.
Hi Alex,
in support forum for the Cusomizr theme I get not answer about my problem. Would you mind explaining again what that piece of code is supposed to do? As I said, it did not change it, the slider is still not translated. Right now, nothing seems to work…@archeryimages.net
You can open ticket at
http://www.wpglobus.com/support/submit-ticket/
- The topic ‘does not translate Slideshow’ is closed to new replies.