Needs work
Project:
Translation 404 - Translation Page Not Found
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2009 at 15:13 UTC
Updated:
15 Oct 2009 at 17:41 UTC
My multilingual site contains 3 languages: English, Spanish and Portuguese.
Steps to reproduce:
1. Create a node in, for example, Portuguese. The list of languages in the language switching block is generated correctly:
<ul>
<li class="en first">
<a class="language-link" href="/en/translation_not_found">English</a>
</li>
<li class="es">
<a class="language-link" href="/es/translation_not_found">Español</a>
</li>
<li class="pt-pt last active">
<a class="language-link active" href="/pt/my-pt-node">Português</a>
</li>
</ul>2. Create a translation of the node, for example the Spanish one. Then the language switching block is the following:
<ul>
<li class="es first active">
<a class="language-link active" href="/es/my-es-node">Español</a>
</li>
<li class="pt-pt">
<a class="language-link" href="/pt/my-pt-node">Português</a>
</li>
<li class="en last">
<a href="/es/translation_not_found"/>
</li>
</ul>Problems:
Comments
Comment #1
gavri commentedThanks for the input - Ill try to fix it in the weekend - In the release of stable version
Comment #2
gavri commentedI have a question for you - if you disable the 404 module - and do the same process as you describe what links do you get on the switcher?
Comment #3
gavri commenteddon't mind the last comment i manged to fix this issue tell me if you experience this problem again.
The problem was that by default Drupal don't show untranslated link if there are more than two languages - I didn't know that till I examined your issue.
This issue is now fixed in the new stable version i released (6.x-1.0)
thanks :)
Comment #4
petrd commentedI see 2 problems in the stable version:
There is a typo in node.translation404.inc on line 13, it says
$return = arraya();
but should say
$return = array();
Once this typo is fixed, the module works well except one thing: the order of languages is not respected in the language switching block. On my site the languages are sorted in the following way:
English
Spanish
Portuguese
But when a node is translated only into Spanish and Portuguese, the links in the language switching block are sorted differently:
Spanish
Portuguese
English
The other issues I reported are fixed.
Please let me know if you need any additional info.
Thanks for working on this!
Comment #5
petrd commentedreopening...
Comment #6
gavri commentedOK i fixed the array bug - but i had trouble to fix the order problem.
I will try to fix it soon but I couldn't find out why this is happening - my hook implementation function (translation404_translation_link_alter) returns the array in the default language order.
in the meantime I suggest you can fix this issue by writing your own theme function for the theme_links function the locale language switcher is using - I hope I will find out soon what is wrong here and give you a better answer.
Comment #7
milos1234 commentedhi there, have you had any chance yet to fix this problem?
this plugin is very important to a multi-language drupal installation, but it seems like there are still a few problems with it
many thanks
Comment #8
milos1234 commented"you can fix this issue by writing your own theme function for the theme_links function the locale language switcher is using"
sorry, can you please explain how to do this.
thanks
Comment #9
milos1234 commentedGavri, have you had a chance to sort out the re-ordering of the language links yet? am about to launch a site, but cannot until it is fixed. thanks!