Defining Mobile Forms in a Separate Language

A convenient way to design forms for Mobile Devices is to add a new translation (language) to the model, and re-design the forms for an ispec to suit the screen size of the target mobile device. When the Component Enabler folder is generated, this produces a set of forms for one language to be used on the desktop and for another language to be used on the mobile device. The presentations are different, but the application logic remains the same.

This functionality is supported by a new tag in Web.config called MobileLanguage, which can be set to the translation used for designing the Mobile Device forms. For example, if the second translation is named "Mobile", then add the following tag in Web.config:

add key="MobileLanguage"
value="Mobile" /

At runtime, when a mobile browser connects to the ASP.NET application, it is detected as a mobile device, and a message is sent to the runtime to switch to the mobile language. This processes the ASP.NET Web Forms generated for the specified language and send them to the Mobile Device instead of the Web Forms that were designed for a desktop browser.