language browser's detection

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
12/8/2009 2:50:26 AM
Gravatar
Total Posts 98

language browser's detection

Hi Joe

  Tell me please how can I make language detection on mojo

   I have 4 interfaces and for French per example the mapped folder "fr"

   I need to redirect my site to this interface when user select french language on her browser

   Seems that navigator.language or navigator.userLanguage not work on client side

  Can I resolved this using mojo?

 

  Valik

12/8/2009 3:20:02 AM
Gravatar
Total Posts 55

Re: language browser's detection

So, you have folder-based multiple sites. I presume that you have set the right preferences in web.config for every site of yours.

Language detection and automatic, language-based redirection to one of your sites during first visit to you portal is something you can solve independently of mojoPortal.

Simply set your portal's default document (in IIS or Apache) not to mojoPortal's default.aspx but to, say, LanguageSelector.aspx. Put that LanguageSelector.aspx page in your portal root where mojoPortal's default.aspx also resides.

So, when user hits your portal after typing http://yourportal.com/ she will actually hit http://yourportal.com/LanguageSelector.aspx

In Page_Load method of LanguageSelector.aspx you should have something like:

string[] languages = Request.UserLanguages;

switch (languages[0].Substring(0,2)) {

case "en":

Response.Redirect("yourportal.com"); // If english is default language.

break;

case "fr":

Response.Redirect("yourportal.com/fr/");

break;

default:

Response.Redirect("yourportal.com"); // Or some other site you want to be default.

break;

}

12/8/2009 9:27:36 AM
Gravatar
Total Posts 98

Help for setup solution after work with inline code

 

 Hello all developers,

 Please help one  beginner on mojo!

  I work to this moment with code inline (and seems to be a problem now: if i add on master.page <script runat="server"> the layout is broken)

  Please tell me how can i revert this code and open my solution to see the code behind

  I look on developer movies training but didn't find how use it.

  I created already a few custom controls (same the code is inline) and have 4 interfaces for site

   Can anyone help me to setup a solution and to get from mojo only these files which i need for?

   I'm beginner and Is not enough for me  the presentation from this site !

 (we can program one meeting on mikogo if someone can help me)

 

 I will appreciate the help!

Thanks,

  Valik

You must sign in to post in the forums. This thread is closed to new posts.