You are on page 1of 26

Internationalization in Software Design and architecture

Multi-Layer and Multi-tier Architecture

Introduction
Internationalization(i18n) is the process of designing an application so that it can be adapted to different languages and regions, without requiring engineering changes. Localization(i10n) is the process of adapting software for a specific region or language by adding locale-specific components and translating text.

Focal Points of Internationalization


Language Computer-encoded text
Alphabets/scripts; most recent systems use the Unicode standard to solve many of the character encoding problems. Different system of numerals. Writing direction Text processing differences, such as the concept of capitalization

Input
Enablement of keyboard shortcuts on any keyboard layouts.

Graphical representation of text(printed materials, online images containing text) Spoken(Audio)

Focal Point (Contd.)


Culture Images and Colors issues Names and titles Currency (symbols, positions of currency markers) Weights and measures Government assigned numbers (such as SSN in US, National insurance number in the UK and in Pakistan CNIC No.) Telephone numbers, addresses and postal codes etc. Paper Size.

Focal Points (Contd.)


Writing Conventions Date/time format, including use of different calendars Time Zones Formatting Numbers(decimal separator, digit grouping) Differences in symbols ( e.g. quoting in English and << >> in French)

Focal Points (Contd.)


Any other aspect of the product or service that is subject to regulatory compliance
Disputed borders shown in maps.

Multi-layer and Multi-tier Architecture

What is Architecture.?
Formal Definition: Software architecture is the fundamental
organization of a system, embodied in its components, their relationships to each other and the environment, and the principles governing its design and evolution.

Why is i18n important?


Build once, sell anywhere Modularity With the addition of localization data, the same executable can be run worldwide.

Characteristics of i18n...
Textual elements such as status messages and the GUI component labels are not hardcoded in the program. Instead, they are stored outside the source code and retrieved dynamically. Support for new languages does not require recompilation. Other culturally-dependent data, such as dates and currencies, appear in formats that conform to the end-user's region and language.

Really why
Carmaggedon

The rest is Java why?


Java:
is readable! has most complete built-in i18n support. easily illustrates correct implementation of many i18n concepts. concepts can be extended to any language.

Java Example: Messages...


Before:

System.out.println("Hello."); System.out.println("How are you?"); System.out.println("Goodbye.");

Too much code!


After:

Sample Run
% java I18NSample fr FR Bonjour. Comment allez-vous? Au revoir. % java I18NSample en US Hello. How are you? Goodbye.

What do I have to change?


Just a few things
messages labels on GUI components online help sounds colors graphics icons dates times

What s easily translatable? Isolate it!


Status messages Error messages Log file entries GUI component labels
BAD! GOOD!

Button okButton = new Button(OK);

String okLabel = ButtonLabel.getString("OkKey"); Button okButton = new Button(okLabel);

Localizability
As confusing as it may sound, localizability is an aspect of internationalization, not localization. It involves enabling the product to be easily localized, without manipulating code or having to edit files that contain code.

Tips for Localizability


Never hard-code anything :Even constants, literals, and similar items can be defined in the definition Section of a program, or in a header file. This is more than i18n, it's structured coding.

Do not restrict font size:Asian characters require a much larger point size for legibility than Latin characters. If a small font size is necessary to fit all the English text into a layout, then the layout needs to be redesigned. See the layout section for more information.

Be aware that the operating system(s) your program is running on may also be localized.:Messages may be translated, even in system commands. If you need to parse the output of an OS command, change the environment locale for that command.

Software Architecture
Software architecture is process of designing the global organization of a software system, including:
Dividing software into subsystems. Deciding how these will interact. Determining their interfaces.

The importance of software architecture


Why you need to develop an architectural model:
To enable everyone to better understand the system To allow people to work on individual pieces of the system in isolation To prepare for extension of the system

Describing an architecture using UML


All UML diagrams can be useful to describe aspects of the architectural model Four UML diagrams are particularly suitable for architecture modelling:
Package diagrams Component diagrams Deployment diagrams

UML diagrams

The Multi-Layer architectural pattern


In a layered system, each layer communicates only with the layer immediately below it.
Each layer has a well-defined interface used by the layer immediately above.
The higher layer sees the lower layer as a set of services.

Example of multi-layer systems

The multi-layer architecture and design principles


1. Divide and conquer: The layers can be independently designed. 2. Increase cohesion: Well-designed layers have layer cohesion. 3. Reduce coupling: Well-designed lower layers do not know about the higher layers and the only connection between layers is through the API. 4. Increase abstraction: you do not need to know the details of how the lower layers are implemented. 5. Increase reusability: The lower layers can often be designed generically.

You might also like