Subversion Repository Public Repository

Nextrek

Diff Revisions 1049 vs 1052 for /Web/Smartcharging_search/maps-frame.php

Diff revisions: vs.
  @@ -1,5 +1,23 @@
1 + <?php
2 +
3 + if ($_SERVER['HTTP_HOST'] != "localhost"){
4 + define( '_JEXEC', 1 );
5 + define('JPATH_BASE', '../');
6 + require_once ( JPATH_BASE .'/includes/defines.php' );
7 + require_once ( JPATH_BASE .'/includes/framework.php' );
8 +
9 + $lang = JFactory::getLanguage();
10 + $lang->getTag();
11 + } else {
12 + $lang = "it-IT";
13 + }
14 +
15 + $mapLang = substr($lang, 0, 2);
16 +
17 + ?>
18 +
1 19 <!DOCTYPE html>
2 - <html>
20 + <html lang="<?php echo $lang ?>" >
3 21 <head>
4 22 <meta content="width=device-width, initial-scale=1.0" name="viewport" user-scalable=no>
5 23 <?php
  @@ -20,12 +38,14 @@
20 38 <script src="js/template.js"></script>
21 39 <script src="js/popup.js"></script>
22 40 <script src="js/maps-google.js"></script>
41 + <script src="lang/lang.js"></script>
23 42 </head>
24 43 <body>
25 - <input id="pac-input" class="controls" type="text" placeholder="Search Box">
44 + <input id="pac-input" class="controls" type="text">
45 + <script>$('#pac-input').attr("placeholder", getText("Cerca", document.documentElement.lang));</script>
26 46 <div id="map"></div>
27 47 <script async defer
28 - src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDUqBLxMo-RgdekbpMbRUQRxr9ZyXXBdWY&libraries=places&callback=initAutocomplete">
48 + src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDUqBLxMo-RgdekbpMbRUQRxr9ZyXXBdWY&language=<?php echo $mapLang ?>&libraries=places&callback=initAutocomplete">
29 49 </script>
30 50
31 51 </body>