CodeIgniter Forums
add another language to the site - database content - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: add another language to the site - database content (/showthread.php?tid=49304)



add another language to the site - database content - El Forum - 02-14-2012

[eluser]Krystian[/eluser]
Hi,

I`m finishing building website which contains
1. vertical menu
2. multilevel horizontal menu
3. and content of each of above

all texts I have in db.

ad 1)

vmenu_id | vmenu_name | vmenu_active

ad 2)

id | label | link | parent | sort

ad 3)

this contains pages which belong to point 1
page_id | page_title | page_text | vmenu_id

this contains pages which belong to point 2
product_id | group_id | product_name | product_desc | product_pdf |


can you give me a tip how to add another language to such a structure?


best regards


add another language to the site - database content - El Forum - 02-14-2012

[eluser]InsiteFX[/eluser]
CodeIgniter User Guide - Language Class



add another language to the site - database content - El Forum - 02-14-2012

[eluser]Bhashkar Yadav[/eluser]
do you have language switch option also at website?

if so create a folder at root for other language.
like for french crate folder named 'fr' and copy the root index file here. update system folder path
Code:
$system_path = '../system';

and add more config variables:
Code:
$assign_to_config['global_vars']['language'] = 'french';
$assign_to_config['global_vars']['language_code'] = 'fr';
$assign_to_config['global_vars']['language_alias'] = 'french';

for switching the language prepare the URL like yourdomain.com/fr/