Custom Language Selector

Posted by Community Admin on 03-Aug-2018 09:42

Custom Language Selector

All Replies

Posted by Community Admin on 16-Sep-2011 00:00

HI everybody!

Can you please see the attached image for the complete understanding of the required functionality. I did hard work to design this scenario because I have already asked this question on the forum but did not get satisfactory and correct answer.

Please also specify when and how to change the culture as well.

Also suppose I want this on a button click event.

Many Many Thanks In Advance!

Posted by Community Admin on 22-Sep-2011 00:00

Hi Waqar,

I reviewed your diagram but it is somehow confusing - under Nen (in English) you have a page in Arabic and under Nar (in Arabic) you have an English page. This is not quite possible or I don't understand your idea? Also, do you need a walkthrough on how to go back 2 pages in the hierarchy (you could use the Parent property of PageNode). Please give us more details.

Regards,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 22-Sep-2011 00:00

Thanks for the reply.

You are right I made a mistake in the diagram. Can you please see 2nd attached diagram.

Please reply ASAP.


Thanks

Posted by Community Admin on 22-Sep-2011 00:00

Hello Waqar,

Well I'm not sure how exactly you try to retrieve the AR page but if you know the UrlName of the Nar page you could use this code to retrieve it:

var pageManager = PageManager.GetManager();
var page = pageManager.GetPageNodes().Where(p => p.UrlName == "Nar").FirstOrDefault();

Then you can retrieve a list of subpages of the Nar page with

var subPages = pageManager.GetPageNodes().Where(p => p.ParentId == page.Id);

and by cycling through then get to the "A" page.

Regards,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 23-Sep-2011 00:00

Thanks for the reply,

I think the diagram is misleading you, So lets start with the simple question can you please provide the code for my custom language selector? Which should have same functionality as sitefinity language selector.

Posted by Community Admin on 26-Sep-2011 00:00

Hello Waqar,

We do not have a ready code for custom language selectors - please check these forum threads - they might be useful for you:

http://www.sitefinity.com/devnet/forums/sitefinity-4-x/developing-with-sitefinity/custom-language-selector.aspx

http://www.sitefinity.com/devnet/forums/sitefinity-4-x/developing-with-sitefinity/language-selector-and-url-rewriting.aspx

Regards,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed