Closed (won't fix)
Project:
Internationalization
Version:
5.x-2.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Sep 2007 at 11:16 UTC
Updated:
11 Mar 2010 at 16:19 UTC
Hi,
I think there is a bug in creating a translation of a node. After clicking "create translation", user is redirected to node add page with predefined values of the parent node. But the language remains the same as the current selected language. I think that the interface should switch to language of created node. Otherwise, there are problems with:
- creating menuitems
- pathauto ([lang] points to original lang, not translation!)
So if my current language is "cs", link to create english translation shouldn't be:
http://www.example.com/cs/node/add/novinka?translation=49&language=en
But:
http://www.example.com/<strong>en</strong>/node/add/novinka?translation=49&language=en
Comments
Comment #1
LeisureLarry commentedI totally agree with you that not changing the language causes problems with creating menuitems and have fixed this problem for my Drupal 5.2 installation.
Go to your modules folder and in the folder i18n/translation. Open the file translation.module and search for the following line:
$options[] = l(t('create translation'), $createlink, array(), "translation=$node->nid&language=$lang");
Add the following line just above this line:
$createlink = $GLOBALS['base_url'] . '/' . $lang . '/' . $createlink;
Greats from Germany
LeisureLarry
Comment #2
jose reyero commentedI find current behaviour quite consitent and it really works as expected. Content and interface language are meant to be independent.
However there's this translation module setting. If you want to propose a patch that takes this into account it will be accepted:
Language Management:
- Interface language depends on content.
- Interface language is independent
Comment #3
jose reyero commentedThis won't change for 5.x
Comment #4
TripleEmcoder commented