Hi... i have a fix... without hacking the core...
This has not been fixed in 6.20, so this works there too.
Well the problem:
(1) The language switcher block is designed to hide itself when there is only a single language switch link available. NOW THIS DOES NOT WORK.
(2) Your site has 3 languages. EN RU ET (also i18n "Internationalization" enabled for content)
Now you create a node and View it. You see all EN RU ET in language switcher. As there is no translation yet for RU and ET these links must not be shown. SO THIS IS VERY BROKEN.
You can go to "translate" and click "update translations". Then it will show correctly.. only EN in language switcher [paint (1) states it should not be there also, but it just is and its wrong].
The fix:
Download this module :
*http://www.megaupload.com/?d=2A86K5CF
*http://www.speedyshare.com/files/26416876/striimer_langswitcher.zip
*http://www.2shared.com/file/xekmsZr0/striimer_langswitcher.html
(why is there no attachment enabled for this forum ?)
(all links from third party providers to the same file)
// Enable module "Striimer Language Switcher" under Striimer
FIX ISSUE 2) // TNID = NID fix is activated immidiately.
FIX ISSUE 1) // To use the custom lang switcher block, go to www.yoursite.com/admin/build/block and enable "Striimer language switcher" you should disable the original language switcher.
Other related stuff...
--------------------------------------------------------------------
Andrew Answer - showed hot how fix it in the core:
http://drupal.org/node/237696#comment-3798330
Only on issue 1) - some patches and talk:
http://drupal.org/node/631928
plach - kind of fixed it in core, but its in CVS head.. I cant reach it:
http://drupal.org/node/518364
---------------------------------------------------------------------
The CVS stuff is really intimidating.. try making your grandma read it:
http://drupal.org/node/100748
I have wasted enough days making a module to fix this issue and no time to waste more :(
If anyone wants.. take my module and put it up "correctly".
Im kind of dissapointed such a bug exists in the 6.x production stable core code at all.
--------------
PS: If you find a bug or issue with my module post it here please.
Comments
Works great!
Great... but remember that seems work only for new node created after module's installation.
For all node previously created... you have to run "Update translation" via i18n manually!
Bye!
Oh, totally true... im just
Oh, totally true... im just making a site.. not live jet and needed it fixed badly. 2) is fixed for newly added nodes only.
So i forgot to mention..
To fix the 2) issue for a live site with tons of nodes. I think updating node info in mysql would be the best option.
Don't forget to backup before messing directly with database.. also don't forget to empty cache, browser buffer etc. etc.
Basically... you need "TNID = 0" (example: for node with nid 66, it is 0) value in the mysql database of every node changed to "TNID = NID" (for node 66, it is 66). If TNID is other than 0 (but not empty) then it is pointing to a valid translation node and needs not to be changed. For better info please go to http://drupal.org/node/518364 and with your browser search for "tnid" somewhere user GiorgosK had the SQL command for doing it.
Another suggestion
A little suggestion: this module is very usefull and solve an old, nasty drupal 6 problem!
But I found this page in a very hard way, reading one of 1000 old post about the issue: could you "publish" it as a Offical module?
Or maybe suggest to include in another module previuosly released!
Bye!
Well there are fixes for core
Well there are fixes for core files, just not in the core yet...
And.. at the moment i don't have much time.. i know its a "bad" way to give a module to ppl.
PS. the worst one... issue 2) seems to be fixed in drupal 6.20..
this patch seems to address it and is in this latest release.
but i have not tired it yet.
http://drupal.org/node/357785
WARNING: critical bug in the module after update Drupal 6.20.
Unfortunatly a bug fix about 'tnid' introduced in the last stable version of core (6.20) broke this modules: all nodes created after core update are suffering in this way:
1) Create a Node in default language (ENG)
2) Translate it a another language (ESP)
Back on ENG node again I found that no icon (for translation) are displayed... and NOT ONLY... opening the "translate node interface" (from node page) the ESP translation is not available in the list: I found again the button "add a translation".
Finally: the translation node in ESP is created BUT seems not part of translation group, appearing like a "stand alone" node.
Disabling the module the translation system works fine (again) but only for new nodes after removing component.
Node created while module is enabled (and after core update) remain corrupted in their "translation group setting".
I hope this could be useful for a patch...
Fixed it..
Seems it was not core related. 6.20 did not affect anything. Point (1) and (2) are still as broken as before.
I broke the module myself with adding one important IF statement but accidently removing another important IF statement. And i uploaded broken version. Sorry.
Stole a minute to upload the fixed versions.. use links from first post.. their updated now.
Seems not working!
I tryed again this module, but seems not working:
I see links for languages even if translations are not present!
it should work...
It does not update your existing content.
The TNID-s are fixed on creating a node.... point 2)
The TNID will also get fixed if you update translation for a node... but for this you don't need my module.
tnid must be 0 for translation selection fields (autocomplete)
Hello,
I have been using your fix for weeks and it helped a lot. Thank you for your work!
However, I just noticed the i18n node translation selection feature (i.e. the autocomplete fields that can be accessed on node//translate) is apparently not compatible with the fix for issue #2. Indeed, the autocomplete fields will select nodes that are not part of a translation set, yet (i.e. only those where tnid = 0).
We therefore have two choices :
An obvious fix would be to modify the autocomplete callback function for it to retrieve nodes that match the appropriate language AND (tnid = 0 OR tnid = nid). However, I am not sure to be aware of and/or understand all the implications of such a change (if possible at all).
Do you have any opinion on this?
Best regards,
Julien
Configuration :