ASPX templates
Version 5.x > ASPX templates > Multi Lingual version View modes: 
User avatar
Member
Member
eoin-fusio - 11/19/2012 8:54:20 AM
   
Multi Lingual version
I've a template site that has various languages in the back end and various pages translated into those languages. I inherited this project though and it doesn't appear to have a language selector anywhere on the front end.

I've noticed that there appears to be a webpaarts language selector which won't work with my template model. I'm happy enough coding C# but I'm unsure what the URL's should be, what querystring changes a site from one language to another? Is there a set format?

Thanks!

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/20/2012 3:24:13 AM
   
RE:Multi Lingual version
Hi,

What do you mean it won't work with your model? Are you using different model than Portal engine or ASPX or mixed? The web part works in each one of them just fine. Coudl you please explain what exactly you mean?

Best regards,
Juraj Ondrus

User avatar
Member
Member
eoin-fusio - 11/20/2012 4:36:39 AM
   
RE:Multi Lingual version
Hi

sorry I thought the web parts wouldn't work with the ASP template version of the site. So, if I'm to use the web part language selector, how do I add it to the master page of the site?

Thanks.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/20/2012 5:01:11 AM
   
RE:Multi Lingual version
Hi,

I think you mean ASPX templates - you can add it as any other web part. It should be worthy to go through the ASPX templates development model documentation.

In your case, you need to register the web part e.g.:
<%@ Register Src="~/CMSWebParts/Localization/languageselectionwithflags.ascx" TagName="languageselectionwithflags"
TagPrefix="cms" %>

and then use it on appropriate place:
 <cms:languageselectionwithflags runat="server" ID="wLS" />

Best regards,
Juraj Ondrus


User avatar
Member
Member
eoin-fusio - 11/20/2012 6:03:34 AM
   
RE:Multi Lingual version
Excellent, thanks will try this.

User avatar
Member
Member
eoin-fusio - 11/23/2012 4:59:54 AM
   
RE:Multi Lingual version
Oddly enough it looks like we don't have a Localization folder in the CMSWebParts directory. Is that specific to a version of Kentico or could it be located elsewhere?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/23/2012 8:32:09 AM
   
RE:Multi Lingual version
Hi,

It is a part of default installation. It seems it was removed or moved by someone who was working with the project before. However, if you have the same version instance running e.g. on other machine, you can copy the web part files to your current instance and register the files as web parts.

Best regards,
Juraj Ondrus

User avatar
Member
Member
eoin-fusio - 12/12/2012 9:18:37 AM
   
RE:Multi Lingual version
Hi

couldn't find it anywhere so I logged into the client area and re-downloaded 5.5 and it's not there either! Any idea where I can get this localization directory or am I looking in the wrong place?

Thanks.

User avatar
Member
Member
eoin-fusio - 12/12/2012 10:26:58 AM
   
RE:Multi Lingual version
Ok found it, it's not actually in the localization directory, that directory doesn't exist for 5.5. It's in the general folder. I've added it but it doesn't really work. Firstly it's showing all languages whereas I only want it to show the languages on translated and published documents.

So it's showing Spanish, Brazilian and a few others when there are only a few documents translated for those languages. How can I limit it to one language?

Secondly I don't want it to appear on the homepage, only on the sub pages.

Any idea how I can accomplish this? All pages are using the same Master page.

Thanks.

User avatar
Member
Member
eoin-fusio - 12/12/2012 10:45:25 AM
   
RE:Multi Lingual version
I've hidden the control on subpages via code but still have the problem of all the languages appearing when in fact only two should really be there. Any ideas?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 12/13/2012 1:54:14 AM
   
RE:Multi Lingual version
Hi,

I am sorry for the confusion, I copied the code from a newer version where the web part was moved to the Localization folder.

The language selector web part displayes all languages that are configured for the site in Site Manager -> Sites -> edit your site -> Cultures tab. If there are cultures assigned to the site you do not want to display, you need to uncheck them from that list.

Best regards,
Juraj Ondrus

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 12/13/2012 1:51:26 AM
   
RE:Multi Lingual version
Hi,

You can download v 5.5 from this direct download link.