Forums › Forums › Search & Filter Pro › Poste Date – Where translate
- This topic has 9 replies, 2 voices, and was last updated 8 years, 11 months ago by Anonymous.
-
Ross Moderator(Private) December 3, 2015 at 3:52 pm #31351
We do not have any of the language files within the plugin.
All S&F does is load the jQuery date picker that is part of WordPress itself.
See here for more info on translating:
http://stackoverflow.com/a/25765380
You need to load the i18n files in your theme
http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/i18n/jquery-ui-i18n.min.js
– alternatively you can supply your own as per this answer:http://stackoverflow.com/a/30937754
Thanks
Anonymous(Private) December 3, 2015 at 4:29 pm #31352Hi Ross,
Thanks for answer but I read on stackoverflowe and for me is hard understand how do this.
Can you help me setup this? I think other peopole will need this if dont have no english website.I find in your file this:
/wp-content/plugins/search-filter-pro/public/class-search-filter.phpwp_register_script( $this->plugin_slug . '-plugin-jquery-i18n', '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/i18n/jquery-ui-i18n.min.js', array('jquery'), self::VERSION ); //wp_register_script( $this->plugin_slug . '-plugin-jquery-i18n', '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/i18n/datepicker-nl.js', array('jquery'), self::VERSION ); wp_localize_script($this->plugin_slug . '-plugin-build', 'SF_LDATA', array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'home_url' => (home_url('/')) ));
I think is transalte but how active, I dont now. Can you help me? Please 🙂
Best
KrystianRoss Moderator(Private) December 3, 2015 at 6:33 pm #31359Try adding this to functions.php:
wp_register_script( 'jquery-i18n', "//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/i18n/jquery-ui-i18n.min.js", array( 'jquery' ), '1.0' ); wp_enqueue_script( 'jquery-i18n' );
Thanks
Anonymous(Private) December 3, 2015 at 7:04 pm #31365I add this to functions:
http://prntscr.com/99yofw
my functions.php
http://pastebin.com/d9Q0k7X0Blank page with error:
Parse error: syntax error, unexpected ‘,’ in /home/public_html/wp-content/themes/sahifa-child/functions.php on line 26Best
KrystianRoss Moderator(Private) December 3, 2015 at 7:06 pm #31366I just updated the code copy and paste again
Ross Moderator(Private) December 4, 2015 at 4:36 pm #31457Well it sounds like there is some issue with the WordPress date picker and your theme / environment.
What you are trying to do is translate the WordPress datepicker, but for some reason this is not working.
Here are some resources I have found that might help:
http://www.remicorson.com/localizing-jquery-ui-datepicker-fields/
https://wordpress.org/support/topic/adding-translation-to-ui-datepickerYou probably should start by adding a datepicker to a template:
https://wordpress.org/support/topic/want-date-picker-at-templateAnd then trying to get the translations working there.
Once you get it working in WordPress, it will also work with Search & Filter.
Thanks
-
AuthorPosts