Paths in 2 languages and block management
Hello Drupal community,
We are new to Drupal development and are developing/migrating and existing bi-lingual newspaper website to Drupal 6. Currently we are stuck with some “major”, at least we think so, problems. I would highly appreciate if the community could lead us into directions to solve any of these problems.
We are using Drupal6 with following modules: CCK, Views, PathAuto, i18n. We have CCK content type named “Article”.
Thanks in advance.
And here we go…
Paths:
We would like for the paths to look like.
www.example.com/[language prefix]/[parent term id]/[secondary term id]/[english version article path] (English version of the article)
Seems like we can get this work for the English language, but not for the translation to Armenian language.
For example:
English: www.example.com/en/sports/football/national_team_going_south
Armenian : www.example.com/am/sports/football/national_team_going_south
Blocks:
We are using blocks for displaying all site content and facing the problem for having to create the same blocks for each language, or Drupal displays items from both languages in the same block. If possible it would be desired to avoid creation of same blocks for two languages.
Also, is there any block management module and/or admin patch available for displaying separately blocks by page or language or term?
Thank you in advance,
Regards,
WaboWabo

Blocks If you are going to be
Blocks
If you are going to be rendering Views displays in your Blocks, what you have to do is pretty straightforward. Edit your view, under the "Filters" section, add a filter and select i18n: Content Negotiation. This tells your View to filter content depending on what language the site is being viewed in.
Paths
Check your settings for Pathauto (/admin/build/path/pathauto). I have not had any trouble generating paths for Spanish articles on my site.
When you enter an article in English, you click "Add translation" and add the Armenian translation. Make sure that towards the bottom of the page the box that says "Automated Alias" is checked. Did you change the "Title" field to Armenian as well? If so, then it should work.
Finally, a recommendation: check out the Localization Client (http://drupal.org/project/l10n_client), if you are localizing a lot of content, this will make your life much easier.
--
Twitter: dh_kosta
Thank you so much kostan, The
Thank you so much kostan,
The hint about i18n filter was what we have been looking for, it works like a charm.
Localization Client was a nice addition; we are going to get all the system translated by professional translators, hope to use this module a lot.
Paths.
We had already done the steps as you have described. Main thing we want to achieve is that, when user selects language from the language switcher the only thing that will be changed in path should be language prefix.
For example in English it should be www.example.com/en/category/subcategory/english_language_article_title
in Armenian translation www.example.com/am/category/subcategory/english_language_article_title.
We can not find the way to control the language prefix provided by core, and pass that to pathauto for the path pattern, instead we are getting duplicated prefixes like /en/en/ when using language prefix pattern in pathauto. OR, when manually inserting the english_language_article_title as path for translation, we get the duplicated alias error.
I will appreciate any help on this matter.
Thanks again for quick reply and help.