Display Custom localization Web Parts

harshal bundelkhandi asked on July 30, 2014 10:30

Hello Support,

I need to show localization web parts on site on POP Window. Means visitor click on langauge image icon window will be popup then visitor choose langauge from pop up windows.

regards, Harshal

Correct Answer

Brenden Kehren answered on July 31, 2014 15:05

By use of a jQuery modal. Create a wrapper around your webpart (set the content before and after fields), ensure the jQuery UI is included in your page and add some jQuery to the head using the Head HTML webpart. You'd have something that would look like this:

<head runat="server">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css" />
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#lang-container").dialog({
                autoOpen: false
            });

            $("#lang-button").click(function () {
                $("#lang-container").dialog("open");
            });
        });
    </script>
</head>
<body>
    <!--button to click on to trigger the modal window -->
    <a href="#" id="lang-button">Change Language</a>

    <!-- modal window contaner with webpart inside -->
    <div id="lang-container" title="Language Selector" style="display: none; position: absolute;">
        <webpart>Select a language</webpart>
    </div>
</body>
1 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on July 30, 2014 13:39 (last edited on July 30, 2014 13:39)

Sounds like a design, front end functionality item. You might look into using a jQuery modal to popup a box for them to select their language.

0 votesVote for this answer Mark as a Correct answer

harshal bundelkhandi answered on July 31, 2014 10:17

Hello ,

Thanks for your quick replay. but how i can load kentico localization control on modal popup.

0 votesVote for this answer Mark as a Correct answer

harshal bundelkhandi answered on August 1, 2014 13:24

Thanks Support.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.