ASPX templates
Version 4.x > ASPX templates > Extending multilingual and international support View modes: 
User avatar
Member
Member
paxer-mail - 6/1/2009 9:27:55 PM
   
Extending multilingual and international support
Hi Guys,

I want to ask you suggestions what the best way to fix my problem.

Our customer what to have feature on site which is allowing to show content for users depending from user state/region/city. We will implement GEO database which will return to us user location (country, state, region, city) by IP address. CMS will have content versions for each pages related to country, state, region, city, so when user visit site, the content should be showed exactly for users location.

My thoughts with Kentico now is to looking the ways to extend current Multilingual/Culture feature which is already in Kentiko.

Probably i think add new counties/cultures for example, i will add English-United State-California, and English-United State-California-Los Angeles this will make them available for language Dropdown which is already in admin interface, and then i will add some custom code logic on each page request and will check which exactly page version should i show to visitor depending from it location.

Please tell me your thoughts, am i looking in right direction ?

Thanks, and sorry for my English.

User avatar
Kentico Developer
Kentico Developer
kentico_zbysekn - 6/3/2009 8:55:34 AM
   
RE:Extending multilingual and international support
Hi,
well you will just create new cultures in section CMSSiteManager -> Development -> Cultures, then you will register these cultures for your site in section CMSSiteManager ->Sites ->Edit Site -> Cultures. Then you will be able to see different cultures in CMSDesk and you can switch between them and create content from them separately.

Finally your script will decide which language version should be displayed and easily just add lang parameter with language code, for example to get French version of Home document you will redirect visitor to:
/Home.aspx?lang=fr-fr


Best Regards,
Zbysek Nemec.

User avatar
Member
Member
paxer-mail - 6/3/2009 6:47:14 PM
   
RE:Extending multilingual and international support
Thanks a lot!

One more question: When i am adding new culture it will be actually "fake culture"
I mean , i need to add new culture for state Queensland in Australia
i will add for example

Culture Name: Australia-Queensland
Culture Short Name: Aus QLD
Culture Code: AU-QLD - here is a little problem, in the code behind there is a validation which is checking does this culture exist
        try
{
System.Globalization.CultureInfo objekt = new System.Globalization.CultureInfo(txtCultureCode.Text);
}
catch
{
result = ResHelper.GetString("Culture.ErrorNoGlobalCulture");
}

and this is good, but i think i need to comment this checking because for my aims i need to add fake Culture codes.

Is that correct thoughts ?

Thanks

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/5/2009 3:13:08 AM
   
RE:Extending multilingual and international support
Hi,

You are correct but this is not recommended since the validation of the cultures can be made also in different parts of the code so you can get exceptions. I would recommend to use some other - existing culture and just change the display name.

Best Regards,
Juraj Ondrus