Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
So far, I've added a language field to the menu table.
We need some interface here.
However it seems that the menu system is currently broken in HEAD so this will have to wait for now.
Comment | File | Size | Author |
---|---|---|---|
#1 | localizermenu_translation.png | 75.24 KB | Roberto Gerola |
Comments
Comment #1
Roberto Gerola CreditAttribution: Roberto Gerola commentedHi.
I've not yet taken a look at your code, but I would like to share with you the solution
that I have implemented in localizer.
Perhaps it could be of some inspiration for a better solution.
I've treated menu items as user provided strings and translated them through
the translation engine that I have implemented.
Then the translation is implemented at runtime through the hook menu.
If you are interested, you can read the code of the module localizermenu, method localizermenu_translate_all.
IMHO, perhaps is not necessary adding a language field to the menu table.
Adding a language filed, it means doubling the menu items, am I wrong ?
About interface translation, I have attached a screenshot of my current implementation.
The top interface is for English (the website's main language) , the bottom for Italian.
In Italian version you can translate only the title and description fields, the other fields
are disabled.
The top language switching combobox is separated for the content or user interface language
and it is used only for administration.
The same interface is used for translating taxonomy and variables.
For variables based forms I have implemented a generic translation interface
that can be used anywhere.
Hope this helps.
Bye
Roberto
Comment #2
Jose Reyero CreditAttribution: Jose Reyero commentedHi Roberto,
I think this, adding a language field, makes sense if we actually want to be able to create different menu items for each language -which I'd like to... This should be more flexible than simply having 'translatable' menu items.
About string translation maybe we should be aiming at a generic solution that works for all user defined strings, thus also providing a common place to translate all the object's strings.
Btw, I'm also looking at localizer module searching for solutions we could reuse here...
Comment #3
Gábor HojtsyMoving to Drupal 7 queue. We don't have a separate code repository now, so no reason to have this separated as if someone is working on it.
Comment #4
Jose Reyero CreditAttribution: Jose Reyero commentedComment #5
naxoc CreditAttribution: naxoc commentedSubscribe
Comment #6
plachComment #7
Gábor HojtsyThe modern solution for this is #916388: Convert menu links into entities. This is won't fix as-is.