In Drupal 8 I have a multi language menu. I'm able to translate the title, but how can I point to a URI specific for that language?
When I change it in one language (e.g. http://www.example.com), it is also changed in the other language, where I want a different domain (e.g. http://www.example.nl).
Is it really necessary to build a menu per language to work around this problem?
Yes, without contrib modules you need a separate menu.
However, there is a module for this: translatable_menu_link_uri.
Related
I'm having a hard time getting to grips with menus when using the Internationalisation (i18n) suite for Drupal 7.
I have two languages set up for the site I'm working on - English and Welsh.
In the Multilingual Options for Main Menu, I've set it to Translate and Localise.
This appears to be fine, but creating the Welsh versions of pages creates nodes that themselves are not linked to the menu, so when they're displayed on the front-end, the menu structure is lost.
However if you do create a menu link for the translated page, you create a new menu item that essentially doubles up the menu size.
Which method is one meant to use? Do you have one menu structure per language and therefore try and work the code displaying the menus to only show the current language or can you somehow let Drupal know that English page N and Welsh page Y both attach to the same menu item?
As ever, any and all assistance given is greatly appreciated.
~Matt
Your best help will come from the drupal docs.
There are a few ways to setup multilingual websites and it wouldn't be possible to cover it all here.
https://drupal.org/node/275705
Follow the above tutorial as you will need to install quite a few modules. My guess is you may have to revisit your Drupal structure before being able to solve your issue.
I've had to work on a lot of French/English websites and the best thing I find is having separate menus for each language. Then use blocks to show your menus using the Language visibility settings. One better is to use the Menu Block module.
With this method you can end up having a lot of menus (as each menu needs to be duplicated per language). However I find content editors can much better grasp this separation, over the confusion of mixing menu items from different languages in the same menu.
I have panel module installed and enable in my site which is built in drupal 6.26 and the version of my panel module is 6.x-3.10. I have created many blocks with the panel and I am having two languages in my site : English and French.
I have also installed and enabled Translation module. Its working fine for other things but not for the title of the panel.
I have searched a lot for this on net but not getting proper solution yet.
thanks in advance.!
If you require any sort of i18n or l10n (internationalization/localization) for Drupal, you should review this doc:
http://drupal-translation.com/
Answering your question, this is taken directly from drupal-translation:
reference: http://drupal-translation.com/content/translating-block-contents#
Drupal's i18n module can translate block contents.
To display blocks in multiple languages, you can use one of these
approaches:
Creating a different block for each language. Using string
localization When you create a block, you can choose to assign it to a
specific language or to all languages and use string translation.
Method 1 - different blocks per language Select a unique language for
the block and indicate which nodes to display it for. You should
select only nodes that are written in the same language as the block.
Then, create similar blocks in other languages and enable them for the
nodes in those languages.
This process will keep complete isolation between blocks in different
languages. They can be translations of each other, but can also
contain completely independent contents. Drupal and i18n don't offer
any facilities for synchronizing between block contents in different
languages.
Method 2 - string localization Drupal can translate strings from
English to other languages (currently, there is no solution for
translating from any language other than English). You can tell Drupal
to handle the title and contents of blocks as strings and look for
translations using Drupal's string translation mechanism.
When a block is being displayed in a different language, Drupal will
look up the title and body of the block to see if there is a string
translation of the title and body. If they are available the
translation will be displayed otherwise it will display the original
text.
In D7 I have used the following workaround :
In panels, I have added to the to the footer a translated standard node without any content (e.g. Basic page). You can also add it to any other region not impacting your layout.
For panel title I have selected the title option "From pane".
On my translated node I flagged the option "Panel title". This option it will appear only after your set your panel title to "From pane".
On the pane options for this node, I have overridden the title to blank.
Final result - the panel title is inherited from the title of the translated node, which itself is not visible.
Hope this will work for you in Drupal 6. For menu item translations, in case you will need it, I have manually added the multilingual menu links pointing to the same panel.
I'm trying to make a multilingual website in Drupal. My languages that I need are german, dutch, english and french. I've added the i18n module and added the languages.
I work with views to show my content on the website. For the moment I have one page that I want to translate in the 4 languages. I've created a view for each translation. Now I want to link my view to the correct node. Therefore I use a view field in my content node.
PROBLEM:
My problem lies in the url. The first time everything is fine.
my url: localhost/?q=nl/activiteiten
Now when I select english in my language bar the language changes but not the url. my url: localhost/?q=en/activiteiten
Here "activiteiten" must be "activities". How do I solve this?
I've searched a while for this problem on the drupal forums but I can't seem to find a good solution to this problem. The only thing I've found is working with a view field in the content node or with input_views in the body of your node. These two won't work for me.
i18 module with no need to create a view for each
language, you have to translate content using the i18, then
charge between changing the language.
You can have problems from the beginning did not use the module
all languages declared, you have to edit each
content and save it to associate it well.
Well, just reading your own answer I think you've taken a wrong turn somewhere (or you're trying to do something else and I didn't quite catch on).
To create multilingual views for pages (which is what I think you want to do) you would first create a page view (duh), specify what you want to be shown and define a path to it. Then you enable (if it's not enabled already) the URL-alias ("URL-aliassen") module and define aliases for each language (ie. FR : activites - I don't like accents in URLs :p - NL : activiteiten, DE : aktivitaten - if memory serves me right anyway, again with accents removed :p). These aliases will be used as the path from that moment on.
For an article describing this process refer to : Translating Views paths in Drupal.
BTW You could also use the Pathauto module to create these aliases based on the title of your nodes of course instead of defining them manually, you can even (re)create them in batch when you alter the settings.
Eventually I've solved my problem with a view field. I've made my view and in my node I've selected that view in the list. Then in the body you can type something for that language.
I'm about to embark on a journey to build a multilingual Drupal site, where I will most likely have to use Views, Panels and Taxonomy pretty heaily. I am a bit worried about the new-node-for-every-language approach, especially using Panels.
So far I've gotten it to work similarly to what I want by not having multilingual support for the Panels content-type, and fetching content that is from Current language and language neutral . This seem to work as expected, but I'm seeing some problems with it. There might be the occasion that I will have to have a language specific Panel (not published in English for example). If I need to have all my Panels multilingual, there seems to be alot of work to place the nodes for every column in every page in every language. I'm thinking I could possibly solve this by fetching the content with some kind of view with arguments, but this will most likely also lead to alot of work.
Is there some proper way of doing what I'm attempting to describe, or do I have alot of seemingly unnecessary work to expect?
I assume you have i18n module (http://drupal.org/project/i18n) and Views module installed. Then you can create a view for each language - one can choose language in "Filter" section of the view definition.
Once you have views, then you can link them to menus or blocks. The problem is you must have a separate version of block or menu for every language, with a proper view associated - Drupal is choosing proper language version itself according to the configuration (typically content type set in a browser). I haven't found any easier way of doing that.
Fortunately preparing multilingual content is not that hard thanks to the "transalte" functionality for nodes after enabling i18n module, so new node for every page is something one can live with.
BTW you are right that the way Drupal is doing i18n is not the best solution one can think of. I am having hard time with it sometimes.
Well there are some serious issues with views over translating taxonomy terms or vocabs names. This could be resolved with some extra modules or / and custom PHP code inside views fields. Usually 70% of modules does not support translation, then you need to patch them to support it. While others does have translation possibility, but it could be two possible ways: uses variables table to hold different translations UI dependent (need to switch to other language to find a string) or uses translation field tables to utilize "translation interface" from admin menu.
So far that's it :)
I wish you luck!
Is it possible to translate a menu path in Drupal using i18n? In other words, basically creating two different links, namely:
www.mysite.com/english -- www.mysite.com/german
In other words, not just altering the paths, but supporting external links for translation.
And if so... how?
I think I don't understand completely - if you enable multiple languages, every link gets a language prefix automatically, like /en, /it etc. You can anyway alter every URL via an URL alias, a seperate one for each language.
you can't translate menu path but you can translate their alias, when you activate path module you can manually set a different path for every defined language.
if you're talking about external urls, based on the language you are viewing in your drupal site - you'd just create a different language specific menu item points to the external site. So when you're viewing your site in spanish, you'd only see the external spanish link, and the english, german, etc counterparts would be hidden