Internationalization

Events happening in the community are now at Drupal community events on www.drupal.org.
shirleyto's picture

Hi,

I've set up a site in Italian at www.[mydomain].com/it (www.[mydomain].com is not a Drupal site), I have the equivalent content in German and am trying to set up a language selector to select between the languages.

If I select the “Path prefix only” option on the language configuration page, would it make the German content to show at www.[mydomain].com/it/de instead of www.[mydomain].com/de?

For the Italian site, the homepage was created as a template (page-front.tpl.php), what should I do for the German version? [I guess I can search online for this]

Would the “ideal” way of setting up internationalization have been creating www.[mydomain].com as a Drupal site in English, add translations onto it, then select the “Path prefix only” option then deal with the language selector?

Thanks.

-shirley

Comments

If you have a Drupal site at

floretan's picture

If you have a Drupal site at www.example.com, the multilingual content module will automatically generate a front page in Italian at www.example.com/it and a German one at www.example.com/de. The problem is that www.example.com is not a Drupal site.

I could see two solutions:

The second solution would be ideal in the long term, but might be need more resources. The first solution works as is, but would still let you switch to the second solution easily in the future.

Regarding the templates, you should be able to use the same page-front.tpl.php. Just make sure that all translated text is either coming from a translatable node, block. If it's text that is directly in the template (not recommended) make sure it's wrapped with Drupal's t() function.

Thanks, Florian

shirleyto's picture

Thank you for your tips. I'll look into solution 1 for now.

Thanks.

-shirley

You can then redirect

smk-ka's picture

You can then redirect www.example.com/it to www.example.com/subdirectory/it.

Alternatively, I think you could also map the localized sites using some mod_rewrite magic. This way subdirectory would never be publicly exposed.

-Stefan