Language selector (locale)

Confluence User - 07 Sep, 2020

Hi,

I need to create bilingual forms (English and French). A user must be able to switch the 2 languages (may be from the UserView) using a select box. On my forms I have already added the translations for my forms labels.

Now I need to add that selector but however I do not know how to do it.

Based on what I have read there are two ways

  • Add a profile to my userview (enable only the locale setting). However this is not a use friendly solution. Furthermore every time a user changes a locale he/she has to enter a password.
  • Use a parameter (_lang) in the URL. This works when I do it manually.  However I do not know how to do automatically from a select button.


Anybody have any other ideas of how to do this?

Or how to change the parameters automatically on the fly?


Thanks


forms;userviews

3


08 Sep, 2020
confluenceUser
1
confluenceUser

Hi, you could try the _lang parameter with something like https://stackoverflow.com/questions/5150363/onchange-open-url-via-select-jquery

08 Sep, 2020
confluenceUser
confluenceUser

Thank you Anders.

However I am not sure how to integrate this solution in the UserView. From the UserView basic menu I see a few controls.

Looks like "HTML Page" is only for static content. 

Can you please provide me with some tips of how to do that?

The idea is that if a user selects a different language on the UserView page, all the menus, forms, etc. should change to that new language.

Thanks

09 Sep, 2020
confluenceUser
confluenceUser

To incorporate the custom HTML and script, you can place it in various places, including the HTML Page menu. You can also put it in a Custom HTML form element, or in the Custom Header or Custom Footer in your Userview properties. However, if all pages will be in the new language, then it is better for the user to select the language in their user profile.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print