[How To - Build an App with Multilingual Support] Change default locale
Forge component by André Madeira

Hi,

I created a multilingual web application. Is there a way to change default locale to a language other than English? 

Solution

Hi Yasser,

As far as I know, it is not possible to set the default locale at design time (in the ServiceStudio).

As an alternative, try to use the "OnBeginWebRequest" system event (right-click on "ServerActions" > "Add System Event"). There you can call the "SetCurrentLocale" system action to your default locale.

Does it work for you?

Regards,

António Pereira

António Pereira wrote:

As an alternative, try to use the "OnBeginWebRequest" system event (right-click on "ServerActions" > "Add System Event"). There you can call the "SetCurrentLocale" system action to your default locale.

Thanks Antonio. It works perfectly.

I have another question. What is the difference between OnBeginWebRequest and OnSessionStart? 


mvp_badge
MVP

António Pereira wrote:

Hi Yasser,

As far as I know, it is not possible to set the default locale at design time (in the ServiceStudio).

There is (or at least there used to be) a way to "swap out" the language that an eSpace was written into a separate locale, while pulling in another of the languages into the module via some command line option.

I wonder if that is still there, and it it implicitly changes the default locale when the module loads?


Miguel


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.