GK News Block multilanguage

eCommerce WordPress theme with various e-store features and WooCommerce support.
GK User
Thu Jul 04, 2013 1:55 pm
Hello,

I'd like to make a russian/english site with WPML, but cannot figured out, how can I translate this widget content correctly. Can you help me?

Thanks,
Zoltan
User avatar
Junior Boarder

GK User
Fri Jul 05, 2013 9:47 am
Hi,

You already have translated posts and category? If so i think that problem is connected with cached widget content. (you can set cache time in widget settings).
Try to edit gavern/widgets.news_blocks.php file and comment this fragment (around line 83)
Code: Select all
if($cache) {
         echo $cache;
         echo $after_widget;
         return;
      }

Check this and let me know, I'll try to find better solution soon..
User avatar
Moderator

GK User
Fri Jul 05, 2013 10:05 am
Thanks for your tip, but doesn't work.

Everything is translated: cathegories, posts, and use the WP-WidgetLogic plugin for widgets with "ICL_LANGUAGE_CODE == 'en'" command.
Works with the english version well, but the russian widget content disappear (only widget title displayed: "RU" - for debugging...)
User avatar
Junior Boarder

GK User
Fri Jul 05, 2013 12:45 pm
Ok,

I tested this with WidgetLogic and in this case, there's no need to comment mentioned fragment. I have two GK News Blocks Widget (widget rules and articles amount settings should be the same - widget options), first (oryginal) has this code in widget logic
Code: Select all
ICL_LANGUAGE_CODE == 'en'
, the second
Code: Select all
ICL_LANGUAGE_CODE == 'pl'

but remember about data source, first widget should has categories slugs as data source: new-collections, second widget should has also categories slugs but translated, e.g. polish-new-collections.

And it's working, if you will have problems with that, send me a PM with backend access and I'll try to help.
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.