2

My client wants their site to be localised, so that example.com/uk presents the uk version, example.com/aus would be the australian version etc etc. However, I want the actual content, and the nodes delivered, to remain and the basic path structure to not change- just prefixed with the country code. Of course I want a 'switch country' button, automatic redirections based on geoIP etc, but for now I just want to focus on the path structure. However, I still want the country selected to be available within views, content types, template files etc, so that uk/products/chairs and aus/products/chairs will still be aliases of node/1 but will then be supplied with a session/cookie/variable set as 'uk' or 'aus'.

Does anyone know any way of doing this please? Google hasn't really supplied much knowledge :/

Many fanks! :)

apaderno
  • 28,547
  • 16
  • 75
  • 90
Matt Fletcher
  • 8,182
  • 8
  • 41
  • 60

1 Answers1

0

If you're on Drupal 7, just go to admin/config/regional/language and click "edit" for each language which will allow you to set the "Path prefix language code." This will append the phrase of your choosing after the domain and before the Drupal path just as you requested.

The "Switch country" button can be found on the Blocks page as the "Language switcher" block.

As for uk/products/chairs and aus/products/chairs, so long as one is a translation of the other (using the built-in locale module and possibly the internationalization module, you shouldn't have any problems.

Patrick Kenny
  • 4,515
  • 7
  • 47
  • 76