A11Y? I18N? L10N? UTF8? WTF?

50 %
50 %
Information about A11Y? I18N? L10N? UTF8? WTF?
Technology

Published on March 1, 2014

Author: mtoppa

Source: slideshare.net

Description

Understanding the connections between accessibility, internationalization, localization, and character sets

A11Y? I18N? L10N? UTF8? WTF? Understanding the connections between: accessibility, internationalization, localization, and character sets Michael Toppa WordCamp Lancaster @mtoppa March 1, 2014

About me…

Unicode Puzzle: PHP Architect, May 2005 PHP Architect, May 2005 PHP

Accessibility ≠ Disability

WCAG Accessibility (A11Y) Guidelines 1. Perceivable <img src="smiley.gif" alt="Smiley face"> 2. Operable <input accesskey="S" type="submit" value="Submit"> 3. Understandable and Predictable <a href="new.html" target="_blank">opens new window</a> 4. Robust and Compatible <label for="first_name">First Name</label>

WCAG Accessibility (A11Y) Guidelines 1. Perceivable 2. Operable 3. Understandable and Predictable ❖ Guideline 3.1.1 Language of Page: ❖ The default human language of each Web page can be programmatically determined. 4. Robust and Compatible

The lang attribute ❖ Declare the language of a WordPress theme in header.php: <html <?php language_attributes(); ?>> For a US English site, this renders as: <html lang="en-US"> ❖ In HTML 5, declare the language of part of a document <div lang="fr">

Uses of the lang attribute ❖ Improves search engine results ❖ Helps support server content negotiation ❖ Supports spelling and grammar checkers ❖ Supports speech synthesizers and automated translators ❖ Allows user-agents to select language appropriate fonts

Language appropriate fonts

Unicode?

Klingon for Unicode

Before there was Unicode… Lower ASCII

Before there was Unicode… Upper ASCII: ISO 8859-1 (aka Latin 1)

Before there was Unicode… Upper ASCII: ISO 8859-2

The Unicode slogan “Unicode provides a unique number for every character, no matter what the platform, no matter what the program, no matter what the language.”

So what is UTF-8?

WordPress supports UTF-8

Learning everyday Japanese with Mangajin

Localization (L10N) and Internationalization (I18N)

Localization “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).” This often involves more than just translation

Internationalization “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.”

WordPress provides internationalization features so you can localize your themes and plugins

Step 1: use WordPress’ I18N functions ❖ Wrap all your text in WordPress’ I18N functions, using a custom “text domain”. Mine is “shashin” ❖ $greeting = __( 'Howdy', 'shashin' ); ❖ <li><?php _e( 'Howdy', 'shashin' ); ?></li> ❖ $string = _x( 'Buffalo', 'an animal', 'shashin' ); ❖ $string = _x( 'Buffalo', 'a city in New York', 'shashin' ); ❖ And others…

Step 2: generate a POT file

Step 3: load your text domain ❖ For plugins: load_plugin_textdomain( 'shashin', false, dirname(plugin_basename(__FILE__)) . '/languages/' );

Step 3: load your text domain ❖ For themes: function custom_theme_setup() { load_theme_textdomain( 'my_theme', get_template_directory() . '/languages') ); } add_action('after_setup_theme', 'custom_theme_setup');

Step 4: include translation files

Questions?

Further reading ❖ W3C ❖ ❖ Why use the language attribute? ❖ ❖ How to meet WCAG 2.0: quick reference Localization vs. Internationalization WordPress ❖ ❖ I18n for WordPress Developers ❖ ❖ How To Localize WordPress Themes and Plugins Internationalization: You’re probably doing it wrong Solving the Unicode Puzzle

Add a comment

Related presentations

Related pages

Michael Toppa: A11Y? I18N? L10N? UTF8? WTF? | WordPress.tv

Web accessibility (A11Y) is about making the web usable for people with disabilities, and it also benefits others with changing abilities, such as older ...
Read more

I18n & L10n | LinkedIn

I18n & L10n Articles, experts, jobs, ... of supporting i18n and L10n can otherwise fall behind just based on the cost of human and process overhead.
Read more

L10n | LinkedIn

WordCamp Lancaster 2014: A11Y? I18N? L10N? UTF8? WTF? 2,956 Views. DaveMcHale. WCRI 2015 I18N L10N. 36 Views. SienaAguayo. Fearless i18n & l10n standalone ...
Read more

Numeronym - Wikipedia, the free encyclopedia

... such as "i18n" for "internationalization". ... a numeronym is composed entirely of numbers, ... a11y - accessibility;
Read more

Computer accessibility - Wikipedia, the free encyclopedia

... computer accessibility ... Accessibility is often abbreviated as the numeronym a11y, ... of internationalization and localization as i18n and l10n ...
Read more

Schedule | Nashville WordCamp 2014

Schedule; Location. Hotels; Questions? After Party; Attendees; Code of Conduct; Schedule. Time ... A11Y? I18N? L10N? UTF8? WTF? Michael Toppa: 11:00 am ...
Read more

WordCamp Lancaster - Toppa Consulting - Nothing But Words

WordCamp Lancaster also had one of the nicest designs for a WordCamp t-shirt that I’ve seen. Here are my slides ... A11Y? I18N? L10N? UTF8? WTF? from mtoppa.
Read more

Michael Toppa | LinkedIn

Michael Toppa; A11Y? I18N? L10N? UTF8? WTF? Understanding the connections between accessibility, internationalization, localization, and character sets ...
Read more