Active
Project:
Localizer
Version:
5.x-1.9
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Jun 2007 at 12:42 UTC
Updated:
13 Aug 2007 at 11:56 UTC
I understand that there are at least three scenarios that people use:
There are some discussions linked to this, for instance, what "any" means here and how to choose the "other" language in 3 (in case no translation exists in the user's current language).
My question is: How can I realize 3? I have both "Multilingual content support" and "Views global support" off and still see all translations (for instance, both the Spanish and English translations of the node) like in scenario 1.
I'd be very glad to receive a hint here.
Thanks,
Kaspar
Comments
Comment #1
hbfkf commentedSomebody can help me with 3)? Is it possible at all?
Comment #2
riemann commentedI'm trying to achieve exactly the same thing. Have you had any luck so far, hbfkf?
Thanks,
riemann
Comment #3
Roberto Gerola commented"Global views support" tries (because there is no definitive way to achieve this) to filter
your nodes based view by current language.
If you don't want this, you can apply for a specific view a specific language filter.
> A node should show up exactly once. If possible, it should show up in the user's current language,
I'm not sure to have exactly understood this.
This should be the default behavior if the multilingual content support is disabled.
>otherwise in an other language.
Are you speaking about a "falling back language" system ?
Let me now.
Comment #4
ablivio commentedHere is a suggestion on how to handle the question of multi-language display. It is based on a very simple set of parameters, but with powerful effects.
What do you think ?
-- Denis.
In the following, the term 'content' refers to a piece of information that is available in one or many 'translations'.
Suppose we have the following configuration scheme:
* [sorted list] Languages preference ordered list. (shorted as PREF below)
This list can contain:
- any of the configured languages
- 'selected', which refers to the currently selected language.
- 'original', which refers to the original language (the language in which the content was written before it was translated) (the way we determine the 'original version' has to be discussed -- for example, it can be the oldest one, or it can be indicated by a flag on content)
Note that it is possible to place 'selected' behind another language. This can be useful if you have an "official language" that you want to use when possible.
* [unsorted list] Languages exclusion list. (shorted as EXCL below)
This list can contain any of the configured languages. Any translation if a language mentioned in this list, EXCEPT the currently selected language, will be ignored and hidden.
* [numeric field] Maximum number of translations to display for a given content. (shorted as MAXT below)
What will be displayed is:
- If n=1, only the topmost displayable translation.
- If n>1, the n topmost displayable translations.
- If n=0, all displayable translations.
----
The selection process of a given content is then performed as follows:
1) all translations mentionned in EXCL (except the currently selected language) are eliminated
2) the remaining list is sorted according to PREF
3) the resulting list is truncated according to MAXT
----
Now, we can easily implement all scenarios mentioned above:
* Scenario 1: a content should show up once for each translation in which it is available
PREF = {all configured languages}
EXCL = {empty}
MAXT = 0
* Scenario 2: a content should show up only if there exists a translation in the user's current language
PREF = 'selected'
EXCL = {empty}
MAXT = 1
* Scenario 3: a content should show up exactly once, if possible in user's current language, otherwise in another language
PREF = {'selected', all configured languages}
EXCL = {empty}
MAXT = 1
We can also have additional interesting scenarios:
* Scenario 4: display content in english when available, otherwise in user's current language
PREF = {EN, 'selected'}
EXCL = {empty}
MAXT = 1
* Scenario 5: display content in any available language, but in klingon (no one except them understand it), except for klingon visitors
PREF = {'selected', all configured languages}
EXCL = {'klingon'}
MAXT = 1
* Scenario 6: display content in user's current language (if possible), and in original version
PREF = {'selected', 'original'}
EXCL = {empty}
MAXT = 2
* etc.
Comment #5
Roberto Gerola commentedMulti language support is already present.
As user or anonymous you can decide in which languages you want to see
the content : http://www.nuwinfo.se/
Content languages option, at the top.
What is yet missing is content language fall back support.
I think I've found a manner to implement this, both for a single node and for a nodes list.
What I think is necessary to do :
- settings under localizer where define the fall back list order based on the current Drupal's activated languages
- same settings for user and anonymous user
We can also think to extend this option to every single node, but it seems to me too complex and not
really useful.
Comment #6
ablivio commentedHello Roberto,
Yes, multi-language support is already present, albeit with some issues that have been pointed out (fallback, etc.). Sorry for the title which was a bit misleading. The idea is to suggest a way to enhance, rather than implement, multi-language support.
Again, thank you for all the great work already done with Localizer!
I agree on the need for settings of a sorted list, which could be defined globally, for a given user, and for the anonymous user. However, one might find that this is more a preference list than a fallback list, for example if in this list you put 'original language' in a better rank than 'selected language'.
I am not sure to fully understand what would be the extension to a single node.
-- Denis.