Hi, since today Drupal 7 Beta 1 is a fact! I have waited very long time for this day (well, actually I hoped it would be stable release by now, not beta). I have two web site projects that are in the waiting queue for D7 release since several months and I think it's time to start work on them, even D7 is still in beta stage. The reason I want to do them in D7 is the huge step that D7 made about multilingual support. It has everything I have dreamed for years! However the i18n module doesn't even has a DEV version by now.
So, my question is, is there any chance I could translate menus (and eventually blocks) without i18n module, by making changes directly to the database? I see there are two tables - "locales_source" that has records for things that could be translated and "locales_target" that has the records for the translated things. The thing is that in the "locales_source" table there are no "menu type items" that could be translated, and the question is how could I add them? And if I add them manually as database records, and add their corresponding translations in "locales_target" table, is that enough for successful translation? Any help and suggestion what to do would be very appreciated.
Thanks in advance.
Comments
same problem / how is translation done in d7 beta?
hello, despite upgrading to the lastest version of the content translation module I cannot find any way to translate content, neighter menu items...
unfortuately I have to run a multi language site. I hope i18n support is added as soon as possible.
I really would like to run drupal 7 and not drupal 6, drupalgardens is awesome!
Thanks! Dennis
subscribing
Subscribing. This feature is a must-have.
I still can't find a way to
I still can't find a way to do that task... I guess there is a lot more to do than just to add some records in the DB. I'm very disappointed this feature is not in the core... it's a half work did by Drupal. There's no sense you have translatable fields, but you don't have everything else translatable! Let's hope i18n module will be ported soon...
Subscribing
Subscribing.
What about i18n module, I think, you should look here: https://github.com/josereyero/i18n
This is i18n package 7.x, and will work with Drupal 7.x
There is no work did to bring
There is no work did to bring i18n to D7 version. The files in github are just copied D6 version files. They are not touched since October 09, when they opened the D7 branch.
It seems there will be looong wait until we see i18n for D7... so, anybody knows any workaround to have multilingual menus?
P.S. Drupal 7.0 is in RC phase since today (it's not even announced yet). Maybe the guys behind i18n module waited for this moment, so they are sure nothing is going to change in the core from now on. I hope they start work soon...
To answer the OP...
this is the way you could translate menu without i18n module (at least that's how I did it in Drupal 6, should work in Drupal 7 as well):
1) create several menu for each of your languages;
2) set up all menu blocks to appear in the region of your choice
3) use the PHP code for each block visibility (haven't tested on Drupal 7):
Replace the "en" with your language codes for each menu block.
4) now if you change the site language you should only see the menu for that language.
Of course there is a complication: now you should maintain several menues at once to keep them consistens across all languages!
OK, thank you for the sample,
OK, thank you for the sample, but where can I paste in that code? In the menu settings, I cannot find a visibility field for php code.
Each menu you create has a
Each menu you create has a corresponding block - use BLOCK visibility settings, as I have explained above
it does not work with drupal 7 for me
this solution would be good enough since I could not get i18n to work with drupal 7, and it's easier and cleaner than i18n, but it does not work with drupal 7
1) Go to Modules, enable PHP
1) Go to Modules, enable PHP Filter core module
2) Go to Structure - Blocks, click Configure for the menu block
3) In Show block on specific pages choose Pages on which this PHP code returns TRUE (experts only)
4) Paste the above code snippet into text field exactly as you see it
5) Choose the placement for your menu block, save it
6) Now switch between languages. You should only see the menu block on pages with English INTERFACE (you can change the language code according to the languages you need)
I just tested it on my D7 installation and it worked like a charm. If it does not work for you, then you must have been doing something fundamentally wrong :)
To answer the OP...
Edit: oops, double post ftw
Subscribing
Subscribing
Context module
You can also use the context module (http://drupal.org/project/context) to conditionally put the menu block in a region using the language as a condition.
I have 7.x-3.0-alpha3 on a 7 site and seems as great as ever so far.
Check progress
You can check http://drupal-translation.com/content/multilingual-d7-progress for updates