Presentation is loading. Please wait.

Presentation is loading. Please wait.

Random Logic l Forum.NET l 20061 Localization & Globalization Forum.NET ● May 29, 2006.

Similar presentations


Presentation on theme: "Random Logic l Forum.NET l 20061 Localization & Globalization Forum.NET ● May 29, 2006."— Presentation transcript:

1 Random Logic l Forum.NET l 20061 Localization & Globalization Forum.NET ● May 29, 2006

2 Random Logic l Forum.NET l 20062 What is – Internationalization? Internationalization - The process of generalizing a product during the development process, so as to enable it to handle multiple languages and cultural conventions allowing adaptation of the product/program to different countries and cultures (also called locales) without necessitating redesign. Generalization is a synonym.

3 Random Logic l Forum.NET l 20063 What is - Localization / Globalization ? Localization (Customization)- The process of customizing your application for a given culture and locale (Localization consists primarily of translating the user interface). OR “Customization of the Internationalized product to a specific region”. Globalization- The process of designing and developing applications that function for multiple cultures. Globalization = internationalization + N x Localizations

4 Random Logic l Forum.NET l 20064 Agenda  How to Localize?  What do we need to translate?  3 primary linguistic Problems to handle.  Three ways to internationalize:  Advantages.  Disadvantages.  Resources tools.  Examples:  VB.NET 2003.  VB.NET 2005.  What’s new in.NET 2005?

5 Random Logic l Forum.NET l 20065

6 6 First, What do we need to translate?  Texts  Images / Flash  Database (Dictionary tables)  Emails (Unicode text files)

7 Random Logic l Forum.NET l 20067 Second, what about other cultural differences that need to be handled?  Dates  String order  Regional attributes …… Therefore, we need to handle 3 main Problematic linguistic issues !!!

8 Random Logic l Forum.NET l 20068 3 main Problematic linguistic issues:  Problem: words order changes in localized files.  Solution: concatenated strings and variables.  The problem happens when we have different order and the string contains parameters. 1

9 Random Logic l Forum.NET l 20069 Linguistic Issues (Cont.) For example: the problem is-  The numbers come from the database.  The text comes from the resource files.  The order in each language is different. The solution:  Use variables/parameters that will be replaced when the page is uploaded. English From %From% To %To% Players. Japanese %From% ~ %To% 人のプレイヤー獲得.

10 Random Logic l Forum.NET l 200610 Linguistic Issues (Cont.)  Problem: In Europe, decimals are usually represented by commas.  Solution: make sure numeric formats are internationalized (prevent that site from crashing whenever decimals are represented with commas). English German  Problem: Different countries – different date formats.  Solution: make sure you list out the date with the full month spelled out, rather than numerically to avoid confusion. June 12, 2006 USA: 6/12/06 Europe: 12/6/06 Cultural issues- won’t be discussed. 2 3

11 Random Logic l Forum.NET l 200611 There are three main ways to internationalize a site:  Text files / Application Arrays.  ResX / resource files (not compiled).  ResX files compiled as assemblies. Every one of these generates the same result. The question is- which one is better for the project and which one is more comfortable for the developers/translator/other stakeholders.

12 Random Logic l Forum.NET l 200612 Text files / Application Arrays:  An hierarchy of folders that holds text files with translations and translated images for all languages.  Dictionary tables are also kept as text files.  At the beginning, all of the texts and the image URLs are uploaded to an array that is saved in the cache / the application object and used during the site flow.  A object that is responsible for uploading all of the data inside those files into arrays when the application is uploaded.  The tooltip of every text, shows the ID of the text file that holds the translation for updating needs.

13 Random Logic l Forum.NET l 200613 Text files / Application Arrays : Advantages:  The translators know exactly where the text is located according to the file name in the tooltip.  The changes that are made can be checked on the spot by the translators (no compilation). There is no need for the developers to upload the changes again and again. Disadvantages:  Many files (maintenance).  Texts files are approached by numbers.  All of the text is uploaded even if it isn’t usually used by the application. If there is lots of data it starts to slow down the site.

14 Random Logic l Forum.NET l 200614

15 Random Logic l Forum.NET l 200615 Resource file tools: What do the translators want?  Searching strings.  Sorting the label IDs.  Exporting to excel (for outsourcing needs).  Copy, Paste and Cut options (with keyboard shortcuts).  See changes online.  Knowing the location of each label / text in the site.  Understanding the context of the text.

16 Random Logic l Forum.NET l 200616 Tools for Resource files: .NET Editor  Resourcer.exe  CuteHTML.exe

17 Random Logic l Forum.NET l 200617.NET Editor: Advantages:  XML Platform- very comfortable.  Already inside the work environment which makes it easy for the developers.  There is a FIND method. Disadvantages: .NET framework installation is needed.  No “export to excel” option.  The XML Platform is cumbrous because characters like,& are shown as codes which makes it unreadable. The other view is worse.

18 Random Logic l Forum.NET l 200618 Resourcer.exe: Advantages: .NET framework installation is not needed (a standalone application- exe file).  The view is very comfortable because there is lots of space for translating and for reading. Disadvantages:  There isn’t a FIND method, only SORT.  Export to excel is not possible which makes it difficult when using an outsourcer.  Copy / Cut / Paste without keyboard shortcuts.

19 Random Logic l Forum.NET l 200619 CuteHTML.exe: Advantages: .NET framework installation is not needed (a standalone application).  The view is very comfortable because there is lots of space for translating and for reading.  There is a FIND method. Disadvantages:  The XML Platform is cumbrous because characters like,& are shown as codes which makes it unreadable. The other view is worse.  Export to excel is not possible which makes it difficult when using an outsourcer.

20 Random Logic l Forum.NET l 200620 ResX / Resource files (not compiled): Advantages:  No need for compilation when uploading a new version of the site text. Disadvantages:  The reading is sequential - not efficient.  The site will perform slower because the resource files are not compiled. We won’t discuss this method in details.

21 Random Logic l Forum.NET l 200621 Resource files compiled as assemblies: Advantages:  Good performance.  You can look for a specific key in the file and you needn’t scan the whole file using a cursor.  Can be compiled as a different project. Disadvantages:  Every time the translators change the resource file, the developer needs to compile the project and upload it.  The developers has the same problem when they change values in the English file and want to observe the changes (A compilation is needed).

22 Random Logic l Forum.NET l 200622

23 Random Logic l Forum.NET l 200623 Example code

24 Random Logic l Forum.NET l 200624 Steps: 1.Create a web-site. 2.Add a new Project for the language support (We want a satellite assembly (separate)). 3.Create a class that handles the retrieving of data from the resource files. 4.Add resource files per language following the conventions. 5.Add folders (one per language) for the images in the presentation layer and add images under them. 6.Add reference to the Multi Lingual DLL. 7.Create labels and images at server side and get their source from the resources. Naming conventionsFallback

25 Random Logic l Forum.NET l 200625 Naming conventions: Why?  The common language runtime identifies a resource by its culture signature or name. How? Resource Files and Images folders:  Each culture is given a unique name (two-digit lowercase).  If required, a two-digit uppercase subculture name associated with a country or region is added.  The subculture name follows the culture name, separated by a dash (-).  For example: ja-JP, en-US. Labels inside the resources:  lbl_[PageName]_[ContentDescription]- Text  ERRMSG_[PageName]_[ErrorMessageDescription]- Error messages  MSG_[PageName]_[MessageDescription]- Notification messages RFC

26 Random Logic l Forum.NET l 200626 Fallback mechanism: A process that locates appropriate resources.

27 Random Logic l Forum.NET l 200627

28 Random Logic l Forum.NET l 200628 Example code- Generating Html Another option is:

29 Random Logic l Forum.NET l 200629 Example code- Culture Initialization Another option is:

30 Random Logic l Forum.NET l 200630 Example code- Cultural formats

31 Random Logic l Forum.NET l 200631 What’s NEW?  Global / Local resources.  An automatic creation of the default resource file.  An attribute for all runat=server controls.  Resource files are not compiled.  3 linguistic problems are no more problematic- simple solution.

32 Random Logic l Forum.NET l 200632 More Information… http://msdn.microsoft.com/asp.net/community/authors/mlb/default.aspx?pull=/library/en-us/dnvs05/html/asp2local.asp http://www.dotnetjunkies.com/WebLog/anoras/archive/2005/02/13/54271.aspx http://msdn2.microsoft.com/en-us/library/ms227427(VS.80).aspx http://www.bhashaindia.com/Developers/tutorial/dotnet/ASPLocalizationFeatures.aspx http://www.code-magazine.com/Article.aspx?quickid=0503081 http://msdn2.microsoft.com/en-us/library/bz9tc508.aspx http://msdn2.microsoft.com/en-us/library/sb6a8618.aspx http://msdn.microsoft.com/asp.net/community/authors/mlb/default.aspx?pull=/library/en- us/dnvs05/html/asp2local.asp#asp2local_topic2http://msdn.microsoft.com/asp.net/community/authors/mlb/default.aspx?pull=/library/en- us/dnvs05/html/asp2local.asp#asp2local_topic2 http://asp.net/QuickStart/aspnet/doc/localization/localization.aspx#langprefs http://msdn2.microsoft.com/en-US/library/bz9tc508.aspx http://www.net-translators.com/safot/Internationalization_i18n.asp http://weblogs.asp.net/jasonsalas/archive/2005/05/04/405530.aspx http://66.249.93.104/search?q=cache:lajzdn2xmsEJ:download.microsoft.com/download/0/8/9/08901ad3-d0e2-4e7d- a9ec-f613621fa2ef/20-dotNetFr-L10n_c.ppt+localization+and+globalization+%2B+ResourceReader&hl=iw&gl=il&ct=clnk&cd=1http://66.249.93.104/search?q=cache:lajzdn2xmsEJ:download.microsoft.com/download/0/8/9/08901ad3-d0e2-4e7d- a9ec-f613621fa2ef/20-dotNetFr-L10n_c.ppt+localization+and+globalization+%2B+ResourceReader&hl=iw&gl=il&ct=clnk&cd=1 http://asp.net/QuickStart/util/srcview.aspx?path=~/aspnet/samples/localization/LocalizePers.src&file=LocalizePers_cs\Loc alizePers_cs.aspx&lang=C%23+sourcehttp://asp.net/QuickStart/util/srcview.aspx?path=~/aspnet/samples/localization/LocalizePers.src&file=LocalizePers_cs\Loc alizePers_cs.aspx&lang=C%23+source http://www.technoag.com/category/code/net/ http://msdn2.microsoft.com/en-us/library/e22s60h9.aspx

33 Random Logic l Forum.NET l 200633 Thank You Questions?


Download ppt "Random Logic l Forum.NET l 20061 Localization & Globalization Forum.NET ● May 29, 2006."

Similar presentations


Ads by Google