How to get url of a page in multilanguage website?
Hi,
I have a multilanguage website. In a custom widget I'm trying to get the home page url. There are two available languages: English and Spanish. The url of the home page is "http://mywebsite/home" for the english language and http://mywebsite/es/home_es for the Spanish.
Using the following code however gives me the wrong url:
PagesConfig pagesConfig = Config.Get<PagesConfig>();
PageManager pageManager =
new
PageManager();
PageNode page = pageManager.GetPageNode(pagesConfig.HomePageId);
string
homePageUrl = page.GetFullUrl(Thread.CurrentThread.CurrentUICulture,
false
);
Hi Vladimir,
There was a bug in the code that we fixed today that might cause this issue. I tested this scenario locally and now there should not be an issue. The fix will be included in the official release.
Regards,
Ivan Dimitrov
the Telerik team