1

What is the least complicated way to translate parts of an existing and quite big site (few hundreds of thousands nodes), without affecting the page aliases?

I am aware of different translation systems and would prefer to use Entity translation. Unfortunately, it seems that both Entity Translation and Content translation don't make it possible to retain a functioning URL structure. E. g. I have this now:

  • Original text's URL (the same pattern should work after translation): example.com/texto-original

After the translation work, it should have this structure:

  • Original text's URL (the same pattern should work after translation): example.com/texto-original
  • Translated text (has language parameter in the URL): example.com/en/translated-text

What I want to achieve:

  1. There's a default language (Spanish in this example) that was used for all of the content so far. Those pages don't have language prefix in the URL (e. g. "es/") at the moment. It should stay that way.

  2. Site should always display everything in Spanish, unless a visitor opens an URL with "en/" prefix.

  3. On the pages that are translated, there should be a link "English", "View this page in English" or something similar.

  4. When a visitor opens such page in English, there should also be a link "Español". If a visitor is on the English page - the interface, blocks and other entities (if translated) should be in English as well.

Sorry if I haven't explained well what I want to achieve, I'll try to explain better if something is not clear.

Thank you for any ideas.

1
  • My suggestion is to use Internationalization (drupal.org/project/i18n) module to do this. You can manage to achieve your goal using this module.
    – ErangaJ
    Commented Apr 17, 2015 at 13:03

1 Answer 1

0

I have found the solution and it's quite easy actually. Here are the steps necessary:

  1. Go to languages settings: admin/config/regional/language
  2. Edit the default language (the one that shouldn't have language prefix).
  3. Remove the code from "Path prefix language code" field.
  4. Go to detection options (admin/config/regional/language/configure) and select "URL" method.

That's it, it should work as I have described in the question.

Your Answer

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

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