avs-code / PREM-Podium-race-E-manager

Description PREM (Podium race e manager) is management software for races and race leagues. It can be used to create overviews of race results. Based on Paddock 7.10beta by: demontpx
https://arv187.github.io/PREM-Podium-race-E-manager/
GNU General Public License v3.0
5 stars 1 forks source link

Add multilenguage option #12

Open avs-code opened 8 years ago

avs-code commented 8 years ago

Keep in mind that most users will not have pay hostings. Must be friendly with free hostings (limitations on bandwith, Inodes Used, database size, etc).

I see two options:

  1. Put separate releases for each translated language. The user downloads PREM in the language available that he wants.
  2. Make a single multi language web, using strings, definitions, etc.
avs-code commented 8 years ago

TASKS

hay que declarar definiciones, y cada definición será una frase. Luego se hace un selector de lengua y dependiendo del lenguaje, se carga un fichero de constantes u otro

avs-code commented 8 years ago

Only work in this after 1.1.0 version

https://manuais.iessanclemente.net/index.php/T%C3%A9cnicas_y_consejos_para_crear_una_web_multi-idioma EXAMPLE: *index.php

<?php
header( 'Location: ./vam/index.php?lang=en' );
  exit();
?>
<?php
if (isset ($_GET['lang']))
    {
        $_SESSION['language'] = $_GET['lang'];
    }
    if (isset($_SESSION['id'])) {
        $user_logged = 1;
    } else {
        $user_logged = 0;
    }
    if (!isset($_GET['lang']) && $_SESSION['language'] == '') {
        $_SESSION['language'] = "en";
    }
    if (isset($_GET['lang'])) {
        $_SESSION['language'] = $_GET['lang'];
    } elseif (!isset($_SESSION['language'])) {
        $_SESSION['languages'] = "en";
    }
    include("./languages/lang_" . $_SESSION['language'] . ".php");
?>

*lang_en.php:

<?php
    // NavBar options
    define ('HOME' , 'HOME ');
    define ('RESULTS' , 'RESULTS ');
etc
?>

*lang_es.php:

<?php
    // NavBar options
    define ('HOME' , 'INICIO ');
    define ('RESULTS' , 'RESULTADOS ');
etc
?>