Skip to main content

Posts

Showing posts from November, 2008

Resources for Windows Application

Resources are created automatically by default by VS.Net for Windows forms. They can be plain text files for string resources or XML files for string and binary resources. You can select language for each form and have different layout for each language. This creates satiellite assemblies for each language which are used by runtime depending on the culture selected. Each satellite assembly resides in a culture specific folder which uses ISO naming convention for e.g. for UK English it will be en-GB and for US English it would be en-US. There is no code in the resource dll. Main assembly will use resourse dll in sub directories e.g. en-GB\assemblyName.resources.dll. You can add custom resources. Naming convention for custom resource file [resourceType].[culture].resx. This way the culture specific custom resouce files will be compile in the satellite assemblies [undocumented feature]. Resouces files are deployed in \[culture] fodler for windows forms and \bin\[culture] folder for asp.ne

Setting up ASP.net for Globalization

You can set Globalization using <globalization> element in Machine.Config or Web.Config <globalization culture="en-US" uiCulture="en-US"/> By setting the culture to en-US, a date will be displayed on mm/dd/yyyy format. If we change the culture to en-GB, the date will be displayed as dd/mm/yyyy format. You can set Globalization setting for a specific folder using by using <location> element You can overwrite <globalization> setting by setting culture in <pages> element You can overwrite config setting at runtime.

Localization, Globalization and Internationalization

Often you need to develop web application which need to be in more than one language or display information depending on which country they are being accessed from. A simple classic way is to have folder files for each language. But this method is error prone and very difficult to manage as the number of language to display in grows. There is where ASP.net Globalization comes handy. Localization is the process of adapting the text and applications of a product or service to enable its acceptability for a particular cultural or linguistic market. Translation is the central activity of localization. Internationalization is planning and implementing products and services so that they can easily be localized for specific languages and cultures. Globalization is an approach to business strategy that aims to address all of the logistical and organizational challenges an enterprise faces as it expands its supporting content, assets and message across cultures and markets to new clients. Globa