Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Regular Contributor
Posts: 244
Registered: ‎05-01-2016
Accepted Solution

Language Selector

Is there a way to remove the language selector from the toolbar in gwmpub.aspx interface.  I seen in web.config there is the list of languages for the pulldown menu.  Thanks!

Highlighted
Staff
Posts: 46
Registered: ‎02-16-2017

Re: Language Selector

If you have the SDK you could do it via code behind file and update the SetupToolbar function in the *.cs file. Not sure you might have already tried this, but on the COTS product you should be able to do via AdminConsole right? Select the gwmpub.aspx layout in the Layouts tab and uncheck the Language selector under Tools Map Toolbar?

 

Vishnu

Highlighted
Regular Contributor
Posts: 244
Registered: ‎05-01-2016

Re: Language Selector

i have the geospatial portal sdk and i am using visual studio 2013 community edition.

Which file the code that needs modification?

thanks!

Highlighted
Staff
Posts: 46
Registered: ‎02-16-2017

Re: Language Selector

OK in portal SDK, you'll have a code behind file call GWMPubPro.aspx.cs file. In that file search for the SetUpMapToolbar() method implementation. There should be a line whcih says  t.Add(MapToolbarCategory.Tools, new LanguageSelector()); comment out this line. Should be on all code behind files of the different layouts. Its towards the end in the method.

Once you comment, build and run and the language toolbar would magically disapperSmiley Happy.

Vsihnu

Highlighted
Regular Contributor
Posts: 244
Registered: ‎05-01-2016

Re: Language Selector

Neither gwmpub or gwmpubpro.aspx.cs have a line with the word languageselector in them - i had searched the entire solution for that and that was how i found web.config which has the list of languages (and was the only occurance i found)

Highlighted
Regular Contributor
Posts: 244
Registered: ‎05-01-2016

Re: Language Selector

i found the line to remove - it is

  AddWorkflowManagerToMapToolbar(this.MapToolbar, this.MainMapStateId);

 

I am working with gwmpub.aspx  so the file i editted was gwmpub.aspx.cs

Highlighted
Staff
Posts: 46
Registered: ‎02-16-2017

Re: Language Selector

Hey, the line to comment to not to get the language option in GWMPub.aspx.cs would be 

 

t.Add(categoryId, new LanguageSelector());

 

the one you mention(AddWorkflowManagerToMapToolbar(this.MapToolbar, this.MainMapStateId)Smiley Wink is to disable the Workflow Manager. 

 

 

Highlighted
Regular Contributor
Posts: 244
Registered: ‎05-01-2016

Re: Language Selector

[ Edited ]

I see the problem - the line you mention was on the same line as the line i commented out (separated with a semi colon)

Search was not finding it

So when i commented out my line it commented out the other line as well.

Thanks for the info!

Highlighted
Staff
Posts: 46
Registered: ‎02-16-2017

Re: Language Selector

Hmm interesting, i have portal SDK EP02 and i sure can see it (see screenshot). Not sure if they changed it on EP03? unlikely, would you want to check the implementaiton of the AddWokflowManagementToMapToolbar method? It should be in the MapBasePage.cs. 

 

 

 

Highlighted
Staff
Posts: 46
Registered: ‎02-16-2017

Re: Language Selector

awesome Smiley Happy!