By Daniel Du
Many developers are trying to localize viewer of MapGuide or AIMS to make it more user-friendly. Here are the basic steps to localize MapGuide Enterprise, This blog is based on MapGuide Enterprise 2011, it applies to AIMS as well with minor changes.
1. Prepare the resource file, which locates at C:\Program Files\Autodesk\MapGuideEnterprise2011\WebServerExtensions\www\localized by default.
2. Copy the file en to a new one named as zh for Chinese, fr for France, for example. Put it into the same directory. Please be note that this is NO extension for this file.
3. Open the copied resource file and translate the message into local language.
4. Save the file, please save it using Unicode if needed, especially for East Asian language.
5. Pass the locale parameter to the Ajax viewer.
<frameset rows="0,*" border="0" framespacing="0">
<frame />
<frame src="/mapguide2011/mapviewernet/ajaxviewer.aspx?SESSION=<%= sessionId %>&WEBLAYOUT=<%= webLayout %>&Locale=zh" name="ViewerFrame" />
</frameset>
6. For these build-in commands, it can be localized by substitute the built-in commands by “Add –> Built-In Command” and localizing the display name and tooltip in MapGuide Studio.
Add Build-in Commands in MapGuide Studio
Localize display name and tooltip
That's it, now your interface is localized!