After upgrading a multilingual website from drupal 5.15 to drupal 6.9 with custom theme. I've been banging my head against the wall with language problems. After upgrading my prefixes don't work anymore as they used to, and no matter what I try, the $language->language is always the default website language.
I have three languages and they used to work on drupal 5 with prefixes, like http://example.com/en, http://example.com/fi, http://example.com/zh-hans
Drupal 6.9 seems to use the prefixes as "part of the url", and not as language prefixes.
For example:
Drupal 5.15: if I go to http://example.com/[language prefix]/node/6 it shows the correct information without depending of the prefix (it can be whatever language and it only affects to site layout but not to the content)
Drupal 6.9: I can only view the node by http://example.com/node/6 and if I add prefix before node I always get "page not found"
Settings I've used:
- On Site configuration > Languages: Path prefix only
- On content types and workflow settings: Enabled, with translation
I have newest stable i18n-module installed.
How and where is the $language object actually generated, and how does drupal actually determinate which language to use, and if the determination is from language prefixes on url, what has changed so drastically in drupal 6 that prefixes are not working anymore? I've tried to search same kind of problems and solutions but nothing has helped.
Comments
Subscribing. I have the same
Subscribing. I have the same problem.
Path Prefixes do not work in new envirnonment
Subscribing - I have a similar problem
I migrated a site from one environment to another (development>>production) and now the language negotiation path prefixes are broken
I can use domain based language negotiation instead and everything works as expected
If I create a fresh Drupal install on the production server and try setting path prefixes it produces similar if not identical behaviour with prefixes producing page not found errors
Both prefixes are set:
En prefix: english
Es prefix: spanish
I'm using:
Locale & Content Translation (Core 6.13)
i18n (6.x-1.1) - Internationalization, Block translation, Menu translation, String translation
Language Icons (6.x-1.1)
It seems to still build the URLs correctly but cannot provide the content which results in "Page not found"
PHP and MySQL are ever so slightly newer on the Production server - Not sure if that's related
CleanURLs work fine in both environments
PHP
Production: 5.2.9
Development: 5.2.1
MySQL
Production: 5.1.34
Development: 5.0.38