[Windows Mobile Apps and Games] trackmeIT:
Italian Language Support ... and more (for mcross)

Hello mcross,

Can I help you adding Italian Language to the web interface?

Ok, the answer is Yes:

language.php, at line 280 add lines:

elseif($language == "italian") //trackmeIT

{

$title_text = "Visualizzatore TrackMe";

$trip_button_text = "Mostra Viaggio";

$location_button_text = "Attiva Tracciamento in tempo reale";

$location_button_text_off = "Disattiva Tracciamento in Tempo Reale";

$filter_button_text = "Mostra";

$filter_none_text = "Mostra Tutti i Punti";

$filter_photo_comment_text = "Mostra Solo i Punti Foto e Commenti";

$filter_photo_text = "Mostra Solo i Punti Foto";

$filter_comment_text = "Mostra Solo i Punti Commenti";

$filter_last_20	= "Mostra Solo gli Ultimi 20 Punti";

$filter_daterange	= "Mostra Per Intervallo Date";

$footer_text = "Informazioni di Tracciamento fornite da";

$incomplete_install_text = "Installazione non completata correttamente! I files install.php e database.sql sono ancora presenti nella cartella TrackMe. Eliminare install.php e database.sql dalla cartella TrackMe per abilitare questa finestra della mappa.";

$no_data_text = "Una o più tabelle di TracMe nel tuo database sono vuote. Devi generare dati utilizzando l'applicazione TrackMe sul tuo dispositivo Windows Mobile prima che la mappa venga visualizzata correttamente.";

$database_fail_text = "Connessione al database fallita. Schermata terminata.";

$trip_none_text = "Nessuno";

$trip_any_text = "Tutti";

$display_options_title_text = "Personalizza Visualizzazione";

$display_header_text	= "Mostra Intestazione";

$display_showbearing_text	= "Mostra Frecce di Direzione";

$display_crosshair_text = "Mostra Mirino";

$display_clickcenter_text = "Clicca per Centrare";

$display_overview_text = "Mostra Anteprima";

$display_language_text = "Lingua";

$display_units_text = "Unità di Misura";

$display_button_text = "Applica Visualizzazione";

$startdate_text	= "Da:";

$enddate_text	= "A:";

$trip_title	= "Viaggio:";

$filter_title	= "Filtro:";

$date_title	= "Data:";

$tripsummary_title	= "Sommario del Viaggio";

$tripstatus_title	= "Stato Corrente";

$summary_time	= "Tempo Totale:";

$summary_photos	= "Foto Totali:";

$summary_comments	= "Commenti Totali:";

// Public Display Information

$user_button_text = "Mostra Utente";

$showconfig_button_text	= "Mostra Configurazione";

$showconfig_button_text_off	= "Nascondi Configurazione";

// Private Display Information

$page_private	= "Accesso riservato. Sono richiesti Nome Utente e Password per l'accesso."; //trackmeIT

$trip_data	= "Dati di viaggio di:"; //trackmeIT

$login_text = "Nome Utente";

$password_text = "Password";

$login_button_text = "Entra";

// Balloon Fields Information

$user_balloon_text = "Utente";

$trip_balloon_text = "Viaggio";

$time_balloon_text = "Ora";

$speed_balloon_text = "Velocità";

$altitude_balloon_text = "Altitudine";

$total_time_balloon_text = "Tempo di Viaggio";

$avg_speed_balloon_text = "Velocità Media";

$total_distance_balloon_text = "Distanza Percorsa";

$point_balloon_text = "Punto";

$comment_balloon_text = "Commenti";

$speed_imperial_unit_balloon_text = "mph";

$distance_imperial_unit_balloon_text = "miglia";

$height_imperial_unit_balloon_text = "piedi";

$speed_metric_unit_balloon_text = "km/h";

$distance_metric_unit_balloon_text = "chilometri";

$height_metric_unit_balloon_text = "metri";

}

index.php, at line 803 add

$html .= " <option value=\"italian\""; if($language == "italian") { $html .= " SELECTED"; } $html .= ">Italian</option>\n";

config.php, line 72 modify to:

// Language (English, Italian, German, French or Spanish)

Then I've found an error in the code (I suppose so ...)

index.php, I think there is a bug for non-english languages at line 402 to 417, I think works better:

if($trip == "None")

{

$html .= " <option value=\"None\" SELECTED>$trip_none_text</option>\n";

}

else

{

$html .= " <option value=\"None\">$trip_none_text</option>\n";

}

if($trip == "Any")

{

$html .= " <option value=\"Any\" SELECTED>$trip_any_text</option>\n";

}

else

{

$html .= " <option value=\"Any\">$trip_any_text</option>\n";

}

another tip for non-english correct display of trip name in the balloon:

index.php, at line 1209 add:

if ($tripname == "Any")

{

$tripnameText = $trip_any_text;

}

elseif ($tripname == "None")

{

$tripnameText = $trip_none_text;

}

else

{

$tripnameText = $tripname;

}

and then modify these lines:

1269

$html .= " var marker = createCustom" . $rounds . "Marker(point,'<table border=\"0\"><tr><td align=\"center\"><b>$user_balloon_text: </b>" . $username . "</td><td align=\"right\"><b>$trip_balloon_text: </b>" . $tripname . "</td></tr><tr><td colspan=\"2\"><hr width=\"400\"></td></tr><tr><td align=\"left\"><b>$time_balloon_text: </b>" . date($date_format,strtotime($row['DateOccurred'])) . "</td><td align=\"right\"><b>$total_time_balloon_text: </b>" . $total_time . "</td></tr>";

modify $tripname to $ tripnameText

The same to do at:

line 1291

$html .= " var marker = createGreenMarker(point,'<table border=\"0\"><tr><td align=\"center\"><b>$user_balloon_text: </b>" . $username . "</td><td align=\"right\"><b>$trip_balloon_text: </b>" . $tripnameText . "</td></tr><tr><td colspan=\"2\"><hr width=\"400\"></td></tr><tr><td align=\"left\"><b>$time_balloon_text: </b>" . date($date_format,strtotime($row['DateOccurred'])) . "</td><td align=\"right\"><b>$total_time_balloon_text: </b>" . $total_time . "</td></tr>";

line 1352

$html .= " var marker = ".$gMarker."(point,'<table border=\"0\"><tr><td align=\"center\"><b>$user_balloon_text: </b>" . $username . "</td><td align=\"right\"><b>$trip_balloon_text: </b>" . $tripnameText . "</td></tr><tr><td colspan=\"2\"><hr width=\"400\"></td></tr><tr><td align=\"left\"><b>$time_balloon_text: </b>" . date($date_format,strtotime($row['DateOccurred'])) . "</td><td align=\"right\"><b>$total_time_balloon_text: </b>" . $total_time . "</td></tr>";

line 1382

$html .= " var marker = createRedMarker(point,'<table border=\"0\"><tr><td align=\"center\"><b>$user_balloon_text: </b>" . $username . "</td><td align=\"right\"><b>$trip_balloon_text: </b>" . $tripnameText . "</td></tr><tr><td colspan=\"2\"><hr width=\"400\"></td></tr><tr><td align=\"left\"><b>$time_balloon_text: </b>" . date($date_format,strtotime($row['DateOccurred'])) . "</td><td align=\"right\"><b>$total_time_balloon_text: </b>" . $total_time . "</td></tr>";

If you prefear I can send you the entire files ...

The last bug I've found, but I had no time to try to fix is when changing from Live tracking Off to On and back it changes the language to English (doesn't remember the choice and takes value from config.php) ... It works ONLY if you put in the config.php file the desired language

I have also defined new vars

$page_private

$trip_data

in language.php in every language under

// Private Display Information

and then modify in index.php line 1443 in this way:

$html .= " $page_private<br>\n";

and line 369 in this way:

$html .= " $trip_data<br>\n";

I hope that these suggestions will be usefull for you and for others.

Best regards,

Riccardo