ASPX templates
Version 4.x > ASPX templates > Supporting multiple languages without creating new documents for each culture View modes: 
User avatar
Member
Member
dogle-bartec-systems - 11/4/2011 5:31:30 AM
   
Supporting multiple languages without creating new documents for each culture
Hi guys, hopefully you'll be able to help.

The website we are currently developing will need to be available in about 10 different languages. We've been using your suggested method, outlined in the following document:

http://devnet.kentico.com/docs/4_1/devguide/index.html?configuring_multiple_languages.htm

We've created all the text that is required on the site as localized culture strings, and referring to those strings as follows: {$home.editabletext$} etc.

Is there a way to only create the documents for the default culture, and switch the content using the localized culture strings, or do we need to create duplicate documents for each new culture? The physical structure of the website will be the same for each language, it will just be the text that will need to change. Ideally we won't have multiple versions of each document to maintain.

Currently, if we don't create each document for every culture we receive redirect errors.

Regards,
Dave

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/6/2011 3:14:21 AM
   
RE:Supporting multiple languages without creating new documents for each culture
Hi,

To achieve your need you will need to develop a custom macro because if you will create just one document in default culture - the document will have the default culture obviously. So, the localization macros won't work because they are resolved according to the current culture of given document.

In your custom macro you will check the culture you want to display (how? you have some flag on the document which will say this is culture X and this is culture Y?) and then send appropriate text translation to the output.

Best regards,
Juraj Ondrus