-
Notifications
You must be signed in to change notification settings - Fork 7.6k
allowing search engines to spider all your langages
Category:Language Category:Internationalization I recently came across the problem where a search engine only indexed one language on my website, even with Roland Blochberger's language selector found here: Language Selection.
Here is how I got around it:
In the httpdocsroot of your CodeIgniter installation, make as many copies of the index.php file as you have languages. For example, I made copies for french and english as such: index_french.php and index_english.php
Then, in each of those files you created, add this at line 46 [code] $language_index = "english"; //allowed values are those for which you have language files properly installed in CI[/code]
Then, add [code]define('APP_LANGUAGE', $language_index);[/code] at line 95, still, for all of the files you created.
And last, I changed, respectively, lines 26 and 40 for [code]$config['language'] = APP_LANGUAGE; and $config['index_page'] = "index_".$config['language'].".php";[/code] in system/application/config/config.php
Now, if you'd like, change your index.php page to have a page that links to any or all of your new files.
Hope this helps someone.