- The Case for Control Adapters
- Making a Control Adapter
- Building the TranslationControlAdapter
- Understanding Translation
- Configuring Your Control Adapter
- Further Resources
Building the TranslationControlAdapter
Now that we have covered the basic of creating a control adapter and applying it for use by configuring a .browser file, let’s take a look at a more advanced use of the technology.
In the following sections, we’ll create a control adapter named TranslationControlAdapter. When applied to any server control that supports a Text property, TranslationControlAdapter will translate the value of the Text property to another language at runtime as determined by the web page’s CultureInfo attribute or by the calling browser’s language setting. Translation will be accomplished using a back-end HTTP call to AltaVista’s BabelFish. Figure 8 shows the overall structure of the control adapter translation architecture.
Figure 8 The TranslationControlAdapter uses back-end translation services accessed using an HTTP call over the Internet.