Feature Request: Language Selection into the WSP

Discussion Feature Request: Language Selection into the WSP

  • Monday, January 02, 2012 10:50 AM
     
      Has Code
    After logging in to WSP the user can't change the language easily unless logout and select the language while login.

    Please add language selection into the WSP panel header or footer section, so the user can change the language at any time without logout.

    Thank you.
    Kursad Olmez

All Replies

  • Monday, January 02, 2012 11:52 AM
     
     
    Not a priority but I like the idea...
  • Monday, January 02, 2012 12:28 PM
     
     

    Hi Buliwyfa,

    I'm using WHMCS for e-commerce and integrated with WSP. Client accounts are automatically created by WHMCS at WSP. So, clients are logging in to the WSP inside the WHMCS without browsing WSP login page and they can't select the WSP language. So, this feature should be MUST in my opinion. Other ways WSP's language support is meaningless.

     

    BTW, I noticed that some kind of bug, I guess.

    I deployed Turkish language pack to WSP and I can select the language from user account settings (top right corner of WSP) to Turkish. But when the user logins the system with English language (from login page) and opens the user settings, language is listed as English not Turkish.

    Shortly, selected and saved language from user account settings is overrided by login page.

     

    Thank you.


    Kursad Olmez


  • Wednesday, January 04, 2012 4:06 AM
     
     

    Well never use WHMCS  but I may found a workaround to solve your issue.

     

    Go to “C:\WebsitePanel\Portal\App_Data” and open file “SupportedLocales.config”

     

    Make sure the 1st language on the list is Turkish.

    Do an iisreset

    Delete cookies from browser (or at least all cookies for WSP URL)

     

    Go to log-in page. It should be in Turkish by default.

     

    This may help you, but I agree passing the language as URL string or having a switch once logged in is a good feature for all “not English”

     

    gg

    • Proposed As Answer by Buliwyfa Wednesday, January 04, 2012 12:33 PM
    •  
  • Thursday, January 05, 2012 7:25 AM
    Moderator
     
      Has Code

    Hi,

    Actually, you can update the code by your own to implement this. The language and theme part is contained inside the login control(login.ascx, locate at "WebsitePanel\Sources\WebsitePanel.WebPortal\DesktopModules\WebsitePanel"). The relate parts are:

      <tr>
       <td class="SubHead" align="right"><asp:Label ID="Label1" runat="server" meta:resourcekey="lblLanguage" Text="Preferred Language:"></asp:Label></td>
       <td class="Normal" align="left">
        <asp:DropDownList ID="DropDownList1" runat="server" CssClass="NormalTextBox" Width="150px" AutoPostBack="True" OnSelectedIndexChanged="ddlLanguage_SelectedIndexChanged"></asp:DropDownList>
       </td>
      </tr>
      <tr>
       <td class="SubHead" align="right"><asp:Label ID="Label2" runat="server" meta:resourcekey="lblTheme" Text="Theme:"></asp:Label></td>
       <td class="Normal" align="left">
        <asp:DropDownList ID="DropDownList2" runat="server" CssClass="NormalTextBox" Width="150px" AutoPostBack="True" OnSelectedIndexChanged="ddlTheme_SelectedIndexChanged"></asp:DropDownList>
       </td>
      </tr>
    
    
    


     

    Also the corresponding events in login.cs file:

      private void SetCurrentLanguage()
      {
                PortalUtils.SetCurrentLanguage(ddlLanguage.SelectedValue);
                Response.Redirect(Request.Url.ToString());
          
      }
            
            protected void ddlLanguage_SelectedIndexChanged(object sender, EventArgs e)
      {
          SetCurrentLanguage();
            }
    
      protected void ddlTheme_SelectedIndexChanged(object sender, EventArgs e)
      {
       PortalUtils.SetCurrentTheme(ddlTheme.SelectedValue);
       Response.Redirect(Request.Url.ToString());
      }
    
    


     

    You can add these related code into the control that is used for account home, in this case, users can select languages and themes after login.

    Hope this helps, thanks.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com. Microsoft One Code Framework
    • Proposed As Answer by Buliwyfa Thursday, January 05, 2012 8:14 PM
    • Unproposed As Answer by Buliwyfa Thursday, January 05, 2012 8:17 PM
    •  
  • Thursday, January 05, 2012 12:32 PM
     
     

    Hi Lloyd,

    Thanks for the suggestion.

    I think adding the HTML code to GlobalSearch.ascx file into the folder C:\WebsitePanel\Portal\DesktopModules\WebsitePanel\SkinControls is enough. But where can I find the file named GlobalSearch.ascx.cs. I guess I have to add the code starting with private void SetCurrentLanguage() into that file. And I also couldn't find the file Login.ascx.cs for taking that code.

    Thanks for helping.

     

     

     


    Kursad Olmez
    • Edited by Kursad Olmez Thursday, January 05, 2012 12:40 PM
    •  
  • Friday, January 06, 2012 2:59 AM
    Moderator
     
     

    Actually, you can get the latest source code here:

    http://websitepanel.codeplex.com/SourceControl/list/changesets

    Click the download button under "Latest Version". Open WebsitePanel.WebPortal solution and you will see all the related portal application source code.

    Feel free to let me know if you are still facing troubles on this task.

    Thanks.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com. Microsoft One Code Framework
  • Friday, January 06, 2012 6:53 PM
     
     

    Hi Lloyd,

    I'm not a .net developer and also not a coder but if I understand right. First, I have to download and change the source codes of WSP as I want. Then I need to compile (or build) the codes to make it useable.

    As I said before I'm not a developer and coder, so making some modifications on WSP isn't easy who are not a developer like me. I'm not comfortable with that. Open source PHP projects are much easier to edit and modify for even non-developers.

    Can you make that modification for the community on behalf of my suggestion and make possible to download compiled files for everyone who wants it.

    Thanks for your effort for helping me.


    Kursad Olmez