0

After a full day of searching, I can't find a way to make the multilingual to work on my site.

I want to create a temporary site to host privacy policies in many different languages (6) but with the skin of our corporate site which is only in English and French. In fact we could have created those pages in the corporate site but we don't want to translate the site in all those languages for now.

I created a new folder to host my new site in multisite mode. I also copy pasted many modules and a theme that was made (by an external firm and where the multilingual works) in my new site's folder to customize/handle them seperatly.

I tried to match all the modules of the original site with my new sites.

I didn't work... All my aliases answers with a

"The requested page "/fr/myalias" could not be found.".

Only the English aliases seems to work.

I followed the solutions found on these web site. Nothing worked.

https://www.drupal.org/node/1069310 https://stackoverflow.com/questions/13648789/drupal-7-url-alias-is-getting-ignored-on-pages-when-provide-a-menu-link-is-un https://www.drupal.org/taxonomy/term/34344?page=7 https://www.drupal.org/node/1216132

At the beginning I though that it was the path alias that wasn't working but after a few hours I realized that the site never quit the English language (default).

I added 5 more languages (fr, nl, es, pt, de).

For a start, I just don't know why/how to change the language. I try calling "/fr" but that also answers with

"The requested page "/fr"

could not be found."

Edit: also I realize that all the (working) pages are called with "/?q=node/somthing" instead of "/node/something"... if that helps...

2 Answers 2

0

About

I realize that all the (working) pages are called with "/?q=node/somthing" instead of "/node/something"

To make your path aliases be human readable, pls check if Path module is enabled and then go to Administration » Configuration » Search and metadata » Clean URLs and check "Enable clean URLs" checkbox. If it is not editable, you should ensure that PHP Rewrite mod is enabled.

To have your content displayed in diffrerent languages correctly you need:
1) Have Locale and Content transpation modules enabled. Both of them are Core modules.
2) Goto Home » Administration » Configuration » Regional and language » Languages and add the languages you need. Ensure that all required langs have ENABLE checkbox chacked. Also ensure that you have the correct Path prefix language codes (can change is edit Language) for each lanf, like "en" (without quotes) for English, "fr" for French etc.
3) Goto Administration » Structure » Content types » Your_content_type (that one you're using for creatinf translatable content) and ensure that in *Publishing options" tab "Multilingual support" is set for "Enabled, with translation".
4) Now create your piece of content and in creating content form set Language select box as "English" and set the URL alias as "policy-1" for example. Save it. Now you should see a "Translate" tab (near View/Edit tabs). Press it, select the lang you need and follow add translation link.

Tip: I don't know how your theme looks, so i'm not sure if you have a lang switcher for users or lang links displayed when viewing transled content. But if you use the same alias for all your translation, you can easily check if it works or not. For example if you set "policy-test" as Path alias for all transleted versions of your test node, you should be able to visit it via [yoursite]/[lang-prefix]/policy-test, i.e. via [yoursite]/en/policy-test or [yoursite]/fr/policy-test etc.

P.S. you don't need to use your lang prefix in path aliases for any language. Drupal will do it itself.

0

When I was looking for another thing I found why by adding "/fr" to the url it was not changing the site in French.

you have to go to Configuration > Regional and language > Languages > Detection and selection

Then you have to check URL in both section (User interface text language detection and Content language detection)

It basically solve all my other problems including the broken alias urls.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.