mojoSetup.cs GetMessageTemplate

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
4/19/2012 8:17:47 AM
Gravatar
Total Posts 88

mojoSetup.cs GetMessageTemplate

Hi,

I´ve found this issue but i dont know if im wrong. On Setup i´ve figured out web.config to start with pt-BR globalization lang, but all Message Templates Run in en-US.

When i put my code on debug mode i found this issue on GetMessageTemplate Method, this method gets the language code from a web.config appSettings that does´t exist!

 public static string GetMessageTemplate(String templateFolder, String templateFile) 

 {            if (templateFile != null)            

{                 string culture = ConfigurationManager.AppSettings["Culture"];               

 if (culture == null)                

{                   

 culture = "en-US-";            

}

 

this code always returns en-US

thanks

4/19/2012 12:19:52 PM
Gravatar
Total Posts 18439

Re: mojoSetup.cs GetMessageTemplate

You could add that setting in user.config if you want to use something other than English. Remember the site has not been created yet so there is no site specific setting to use at the point where that code is called.

<add key="Culture" value="pt-BR" />

but if message template exists for pt-BR its going to fall back to English.

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