When we conferred internally (in the beginning of the current quarter) on the update of the AJAX Car Rental sample application, we asked ourselves the substantial question: How can we make this example even more useful for the developers? And going through the functionality it incorporated, we made the important deduction:

  • Add car location, to make the vehicles more easily discoverable all over the world
    and
  • Include localization to remove the language barrier for users that are not proficient in English.

For the first part the most natural choice was to choose to integrate our Silverlight RadMap control in the car detail screen. And voila!  It is already there, fine and dandy, automatically centering the location of the vehicle on the map for you. Plus, it is localized. But enough words, here is a quick screen dump for your visual pleasure:

AJAX_CarRental_Location

 

For the second part we used the good old ASP.NET localization mechanism with resource (resx) files, placed in the App_GlobalResources folder of the web site. Thus the code implementation was kept virtually intact, and the appropriate localized resources were pulled out from the resource files storage. Note that our AJAX controls honor the current thread UI culture, hence no further modifications are needed to make them display the strings for their localizable elements in the pertinent language.

To select the language of your choice, we included a toolbar in the top right section of the page. Currently we strut localization in four languages (English, German, French and Bulgarian), but your can easily extend the set with more languages by creating resource files for them and placing them in sub-folders of the App_GlobalResources folder. It is as easy as that, no further code intervention is needed.

AJAX_CarRental_Localization

AJAX_CarRental_Schedule


Finally, we reflected the additions on the About screen. And, as usual, the Clear skin which beautifies the demo as well as the updated source code of the application are there waiting you to download and play with them.

AJAX_CarRental_About


Do you find these nuggets useful? Have you explored the localization capabilities of our ASP.NET AJAX controls yet? I will be happy to hear opinions.

Are you into ASP.NET development? Download our AJAX and MVC components now to cut back development time and boost your productivity!


rahnev
About the Author

Stefan Rahnev

Stefan Rahnev (@StDiR) is Product Manager for Telerik Kendo UI living in Sofia, Bulgaria. He has been working for the company since 2005, when he started out as a regular support officer. His next steps at Telerik took him through the positions of Technical Support Director, co-team leader in one of the ASP.NET AJAX teams and unit manager for UI for ASP.NET AJAX and Kendo UI. Stefan’s main interests are web development, agile processes planning and management, client services and psychology.

Related Posts

Comments

Comments are disabled in preview mode.