Digital experiences for all disciplines
New Landing › How can we help? › Atelier › Google Map Language
New Landing › How can we help? › Atelier › Google Map Language
- This topic has 16 replies, 2 voices, and was last updated 8 years by Mohammad – SUPPORT.
-
Posted in: Atelier
-
July 18, 2016 at 2:55 pm #282047
Hi,
My site is in Hebrew. Is there a way I can show the Google Map on my contact page in Hebrew instead of English?
Is there a way of showing a Hebrew map on Hebrew pages and an English map on English pages?
Thanks,
YanivJuly 19, 2016 at 9:11 am #282211Hi,
Please open to edit the functions.php of child theme:-Find this code:-
wp_register_script('sf-maps', '//maps.google.com/maps/api/js?sensor=false', 'jquery', NULL, TRUE);
Change with:-
wp_register_script('sf-maps', '//maps.google.com/maps/api/js?lang=iw', 'jquery', NULL, TRUE);
Thanks
MohammadJuly 19, 2016 at 12:29 pm #282298Hi Mohammad,
The child theme doesn’t have the line you mentioned. How do I correctly add it in the child theme’s funcitons.php?
Thanks
July 19, 2016 at 1:45 pm #282351Hi,
Please paste this code at functions.php of child theme.function sf_enqueue_scripts() { // Variables global $sf_options, $post; $enable_rtl = $sf_options['enable_rtl']; $enable_smoothscroll = $sf_options['enable_smoothscroll']; $enable_min_scripts = $sf_options['enable_min_scripts']; $post_type = get_query_var('post_type'); $product_zoom = $sf_options['enable_product_zoom']; if ( isset($_GET['product_zoom']) ) { $product_zoom = true; } // Page Content Meta $page_has_map = false; if ( $post ) { $page_has_map = sf_get_post_meta( $post->ID, 'sf_page_has_map', true ); } if ( is_page_template('template-directory-submit.php') || get_post_type( $post->ID ) == 'directory' ) { $page_has_map = true; } // Register Scripts wp_register_script('sf-bootstrap-js', SF_LOCAL_PATH . '/js/combine/bootstrap.min.js', 'jquery', NULL, TRUE); wp_register_script('sf-isotope', SF_LOCAL_PATH . '/js/combine/jquery.isotope.min.js', 'jquery', NULL, TRUE); wp_register_script('sf-imagesLoaded', SF_LOCAL_PATH . '/js/combine/imagesloaded.js', 'jquery', NULL, TRUE); wp_register_script('sf-owlcarousel', SF_LOCAL_PATH . '/js/combine/owl.carousel.min.js', 'jquery', NULL, TRUE); wp_register_script('sf-jquery-ui', SF_LOCAL_PATH . '/js/combine/jquery-ui-1.10.2.custom.min.js', 'jquery', NULL, TRUE); wp_register_script('sf-ilightbox', SF_LOCAL_PATH . '/js/combine/ilightbox.min.js', 'jquery', NULL, TRUE); wp_register_script('sf-maps', '//maps.google.com/maps/api/js?lang=iw', 'jquery', NULL, TRUE); wp_register_script('sf-elevatezoom', SF_LOCAL_PATH . '/js/combine/jquery.elevateZoom.min.js', 'jquery', NULL, TRUE); wp_register_script('sf-infinite-scroll', SF_LOCAL_PATH . '/js/combine/jquery.infinitescroll.min.js', 'jquery', NULL, TRUE); wp_register_script('sf-theme-scripts', SF_LOCAL_PATH . '/js/combine/theme-scripts.js', 'jquery', NULL, TRUE); wp_register_script('sf-theme-scripts-min', SF_LOCAL_PATH . '/js/sf-scripts.min.js', 'jquery', NULL, TRUE); wp_register_script('jquery-cookie', SF_LOCAL_PATH . '/js/jquery.cookie.js', 'jquery', NULL, FALSE); wp_register_script('sf-functions', SF_LOCAL_PATH . '/js/functions.js', 'jquery', NULL, TRUE); wp_register_script('sf-functions-min', SF_LOCAL_PATH . '/js/functions.min.js', 'jquery', NULL, TRUE); wp_register_script('sf-smoothscroll', SF_LOCAL_PATH . '/js/sscr.js', '', NULL, FALSE); // jQuery wp_enqueue_script('jquery'); wp_enqueue_script('jquery-cookie'); if ( $enable_smoothscroll ) { wp_enqueue_script('sf-smoothscroll'); } if ( !is_admin() ) { // Theme Scripts if ($enable_min_scripts) { wp_enqueue_script('sf-theme-scripts-min'); if ( $page_has_map ) { wp_enqueue_script('sf-maps'); } wp_enqueue_script('sf-functions-min'); } else { wp_enqueue_script('sf-bootstrap-js'); wp_enqueue_script('sf-jquery-ui'); wp_enqueue_script('sf-owlcarousel'); wp_enqueue_script('sf-theme-scripts'); wp_enqueue_script('sf-ilightbox'); if ( $page_has_map ) { wp_enqueue_script('sf-maps'); } wp_enqueue_script('sf-isotope'); wp_enqueue_script('sf-imagesLoaded'); wp_enqueue_script('sf-infinite-scroll'); if ( $product_zoom ) { wp_enqueue_script('sf-elevatezoom'); } wp_enqueue_script('sf-functions'); } } }
Thanks
MohammadJuly 19, 2016 at 3:05 pm #282380Thanks, but still now there’s another bug after updating the functions.php – the page is stuck on “loading”…
July 20, 2016 at 8:19 am #282523Hi,
Please provide me FTP login detail to check and resolve it.
Thanks
MohammadJuly 20, 2016 at 6:37 pm #282745Sorry, but I can’t give you FTP access (client’s instruction). Please find the functions.php file used at this link:
https://dl.dropboxusercontent.com/u/17133455/functions.phpJuly 21, 2016 at 5:59 am #282818Hi,
Please create zip of functions.php and attach here.
Thanks
MohammadJuly 21, 2016 at 6:02 am #282819July 21, 2016 at 7:23 am #282843Hi,
Code is perfect. Please provide me wordpress login detail to check.
Thanks
MohammadJuly 22, 2016 at 6:51 pm #283405This reply has been marked as private.July 25, 2016 at 7:28 am #283512Hi,
I need FTP login detail because some errors in functions.php of child theme.
Thanks
MohammadJuly 25, 2016 at 10:41 am #283574This reply has been marked as private.July 25, 2016 at 11:20 am #283603Hi,
I have managed to resolve the issue so please check it now.
Thanks
MohammadJuly 25, 2016 at 11:20 am #283604Hi,
I have managed to resolve the issue so please check it now.
Thanks
Mohammad -
Posted in: Atelier
You must be logged in and have valid license to reply to this topic.