Thursday, October 24, 2013

i18n and L10N

i18n and L10N are more difficult than I image. After some research, I understand more why it is hard.

W3C defines i18n and L10N as below.

Internationalization is the design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language.

Localization refers to the adaptation of a product, application or document content to meet the language, cultural and other requirements of a specific target market (a locale).

wikipedia also has explanation about them and list out their scope. 

Internationalization is the process of designing a software application so that it can be adapted to various languages and regions without engineering changes. 

Localization is the process of adapting internationalized software for a specific region or language by adding locale-specific components and translating text. 

Sometimes g12n (globalization) means the process of i18n + L10N.

During i18n and L10N process, we also need understand Locale, Language, Timezone.

Locale settings control how numbers, dates, and times, Currency, Measurement units display for your region - which may be a country, or a portion of country or may not even honor country boundaries.
The locale settings are about formatting output given a locale.
A locale, on the other hand, is a specific international market where a target user is working. A locale encompasses many of the issues discussed earlier when I defined localization: the conventions, culture, language, and preferences of typical users in the environment. This includes issues that are crucial to applications, such as number, currency, date/time formats, and date/time separators. 

Language, on the other hand, is what we speak, read, and write. Language settings control in what language text appears independently of the locale settings.

Language is a term that just about everybody is familiar with; it is a grouping of sounds and symbols that are organized into combinations and patterns S that enable people to communicate. 

Most of the time zones on land are offset from Coordinated Universal Time (UTC) by a whole number of hours (UTC−12 to UTC+14), but a few are offset by 30 or 45 minutes (for example: Nepal Standard Time, NPT). Some higher latitude countries use daylight saving time for part of the year, typically by changing clocks by an hour.

Friday, October 18, 2013

7 browser client side storage

This blog is very good and useful for reference.

  1. JavaScript Variables (Past, Present and Future)
  2. Cookies (Past, Present and Future)  SSL/HttpOnly
  3. (Past and Present)
  4. HTML5 Web SQL Database (Past)
  5. HTML5 Web Storage (Present and Future) sessionStorage/localStorage
  6. HTML5 IndexedDB (Future)
  7. HTML5 File API (Future)

Email template is hard

Email template is hard as there are tons of email client from mobile, desktop and browsers. We need use old school table design and inline CSS with a comprehensive compatibility table to cover different email clients.

We need tools and services to help Email template building. We also need best practice and Email boilerplate when writing Email templates.

outline is unsupported
max-width is unsupported
unaligned td cell is unsupported
3-character hex code is unsupported
style tag in head is unsupported
display is unsupported
Subject limit to 25 characters

Typical structure is one big background table, then one div, then one main table, and nested tables if needed. So table, tr, td and div are the main elements used in Email templates.

Wednesday, October 16, 2013

Change Browser Language Preference

This week I am doing i18n for our web app using requirejs/i18n plugin, after I get translation done, I need test out by changing my browser language. Browser uses Accept-Language request-header to indicate its preference language. Some browser only has one language in the header, some browser has a list of preference languages with qvalues (quality value). One example is Accept-Language: zh-cn,zh;q=0.5

However, i18n is different from L10N which is more region related.

Internet Explorer
Windows only, go to Tools > Internet Options > General (tab) > Languages > Language preference.

Tools > Options (Windows) or Firefox > Preferences (Mac OS X), and select Content (tab) > Languages > Choose (button).

about:config, using intl.accept_languages if want custom language tags

Mac OS X only. The browser language is that specified in the OS X system language preferences. Go to System Preferences > Language & text > Language.

Safari will only send the top item with the Accept-Language header. You can't create custom language tags.

Options (Windows) or Chrome > Preferences (Mac OS X), and select Web Content > Languages & Spellchecker settings.

You can't create custom language tags. Not sure if there is hidden setting for this.

Menu > Settings > Preferences > General > Language > Details (Windows).
On Mac OS X, similar to Safari, it is the language specified in OS X. If you have a long list of languages in this dialog box, Opera sends all of them with the Accept-Language header.

opera:config and the Network > HTTP Accept Language setting if want custom language tags.

Sunday, October 6, 2013

Links from "The future of Javascript Tooling" talk

This was an amazing talk from Ariya Hidayat. I just listed the links here, for details, refer to his deck.

Saturday, October 5, 2013

SVCC 2013

Here are the key takeaway from Saturday's sessions.

1. Functional programming gets fun when Douglas Crockford teaches this using Javascript
2. TCP/IP networking needs tools like wireshark, fiddler and of course ISO layering models (
3. How to startup pitch (Elevator pitch, Executive Summary, PPT 10-20-30 rules, Detailed plan/roadmap)
4. Start business is easy in USA, you can register in one day
5. RegExp cheat sheet explains regular expression match/capture of character set, group, options from a string.

Some sponsors I remember:
Dice - the linkedIn for tech
Pivotal - the new company from VMWare/EMC, brings up Spring, RabbitMQ etc open source
Telerik - the one brings us Kendo UI
LeadTools - the world leader in imaging SDKs, OCR, PDF, PACS (medical image) etc
Snapp - Elastic cloud hosting for .NET application (How about Windows Azure?)
infragistics - User interface components

Of course, for lunch, I had one slice of Pizza Sponsored by Pivotal, one Sandwich Sponsored by Google