-
Notifications
You must be signed in to change notification settings - Fork 7.6k
allowing search engines to spider all your langages
Category:Internationalization Category:Internationalization:SEO Category:Language
This wiki is for CI 1.5.4. I assume it has to work with 1.5.3, but can't confirm with any other version.
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: (see a working model here: http://www.ci3.ca
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 //change english for the language pertinent to this file[/code]
Then, add [code]define('APP_LANGUAGE', $language_index);[/code] at line 97, 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.