[eluser]keevitaja[/eluser]
first read [email=http://ellislab.com/codeigniter/user-guide/libraries/language.html]language class doc[/email] and underestand it. if you have some specific questions, ask them.
language filenames are the same for english and portuguese
./application/language/english/home_lang.php
./application/language/portuguese/home_lang.php
[eluser]Shwetang[/eluser]
To do the translation database I created new tables with the same structure but with a prefix according to language.
Now I need in the load of application to verify the chosen language and change the $config['bdprefix'].
Does anyone have a suggestion of how I'll do it?
[eluser]keevitaja[/eluser]
i would create 2 tables:
header
header_id int autoincrement
content
content_id int autoincrement
header_id int
language varchar
content text
+ some other fields
to add new content:
first create header and get its header_id
second create content and add created header_id and language segment
lets say you have about controller with 2 languages. in content table both languages have identical header_id, but different language segment.
to pull out the data from content table, you use header_id(both languages) and language segment.
[eluser]Shwetang[/eluser]
Hi,
this is my route file :
*/
$route[‘default_controller’] = “redireciona”;
$route[‘404_override’] = ‘’;
// All re-mappings must begin with ‘^(en|et|ru)’ !!!
$route[’^(en|pt)/(.+)$’] = “$2”;
$route[’^(en|pt)$’] = $route[‘default_controller’];
//novas rotas para o menu
$route[‘home’] = ‘main_controller’;
$route[‘en/home’] = ‘main_controller’;
$route[‘a-bysat’] = ‘bysat_controller’;
$route[‘en/a-bysat’] = ‘bysat_controller’;
$route[‘en/produtos-e-servicos’] = ‘prod_serv_controller’;
$route[‘produtos-e-servicos’] = ‘prod_serv_controller’;
$route[‘en/casos-de-sucesso’] = ‘casos_controller’;
$route[‘casos-de-sucesso’] = ‘casos_controller’;
$route[‘en/trabalhe-conosco’] = ‘trabalhe_controller’;
$route[‘trabalhe-conosco’] = ‘trabalhe_controller’;
$route[‘en/entre-em-contato’] = ‘contato_controller’;
$route[‘entre-em-contato’] = ‘contato_controller’;
$route[‘en/contato’] = ‘contato_controller/contato/’;
$route[‘contato’] = ‘contato_controller/contato/’;
$route[‘casos_detalhes/(:num)’] = ‘casos_controller/detalhes/’;
$route[‘en/casos_detalhes/(:num)’] = ‘casos_controller/detalhes/’;
$route[‘segmentos/(:num)’] = ‘casos_controller/segmentos/’;
$route[‘en/segmentos/(:num)’] = ‘casos_controller/segmentos/’;
I have translated my website using mci language package but now the problem is link en/casos_detalhes/(:num) and en/segmentos/(:num) are not working but the other routes as in the links are working very fine ..Someone please help if you know what is happening ...
Thank You