Hello, I'm developing a website that has only 4 pages, and I want to have it in at least six languages, but what should I do for it?
Even with a few pages, I need a lot of text, because the login page includes the "country" field, which contains many countries for example! The idea is as follows:
I want to create multiple files in a "language" folder, such as " portuguese.inc.php ", " spanish.inc, php ", english.inc.php
And within each file as an example:
// Account
$hello = "Olá";
$welcome = "Bem-Vindo";
$go_in = "Entre";
$or = "ou";
$sign_up = "Cadastre-se";
$sign_in = "Entrar";
$forgot_password= "Esqueceu a Senha?";
$logout = "Sair";
$my_account = "Minha Conta";
// Languages
$language = "Idioma";
$english = "Ingles";
$portuguese = "Português";
$spanish = "Espanhol";
$chinese = "Chinês";
$italian = "Italiano";
$german = "Alemão";
$french = "Francês";
$arabic = "Arabico";
$russian = "Russo";
$japanese = "Japonês";
And where will I use the files:
Index.php
<?php
include_once 'languages/portuguese.inc.php';
// Minha Conta
// Olá, Bem-Vindo!
// Entre ou Cadastre-se!
echo "$my_account";
echo "$hello $welcome!";
echo "$go_in $or $sign_up";
What do you think?
Is this the best alternative?
Is there any consequence to this?