A client wants the possibility to change the language of the viewer by clicking on a button from a dropdown. This is default behavior in almost every website but I don't know how to make this in the geocortex webviewer.
-
I don't think this is possible.
The language of the viewer is based on the preferred language of your browser. If you change this, the language of your viewer will change.
0 -
'Almost every website' seems a bit exaggerated to me, but other than that it would certainly be a nice addition.
As far as I know, there's no way to change the language interactively, but someone from VertiGIS, please correct me if I'm wrong.
Reloading the viewer would be an option, because the webviewer accepts a 'locale' parameter in it's URL, e.g. https://apps.geocortex.com/webviewer/?app=a42a8e8864003ab181ff2ab453961abc&locale=en-US so you could build a workflow that gets the browser URL (Get Browser Info), and appends a locale to it.
The hard part is finding a way to open that URL (preferably in the same tab), but it seems that hyperlinks are opened in a new tab by default. The closest I got was by using a Display Form with a hyperlink in a Text element. Some custom development would probably be necessary I'm afraid.
As for the language dropdown, you could do this by using a Display Form that shows a hyperlink for each language.
Alternatively, add a (second) I Want To menu. Rename it to Language, and add a menu item for every supported language. Each item would then call the same workflow with the language passed as a workflow argument. The workflow would then show a message like, 'Click here to change to [language]'.
I admit that both are not ideal solutions, but it's the best I could come up with right now.
0 -
Good news. This came up in another context a little while back and seemed like a good idea. 5.14 includes several helpful new commands and operations that seemed to be missing (a lot of them map related) but we also included a new one for: ui.set-locale which will do what you are looking for.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare