Internationalization in PHP: PmWiki’s approach Dr. Patrick R. Michaud September 13, 2005.

Slides:



Advertisements
Similar presentations
RSS RSS is an acronymn for Really Simple Syndication or Rich Site Summary. RSS (noun) - an XML format for distributing news headlines on the Web. RSS.
Advertisements

WikiWikiWebs and PmWiki Dr. Patrick R. Michaud November 8, 2005.
The creation of "Yaolan.com" A Site for Pre-natal and Parenting Education in Chinese by James Caldwell DAE Interactive Marketing a Web Connection Company.
PHP I.
XHTML Basics.
HTML Semantic Structure
Introduction KWizCom Business Card Founded in 2005 Headquartered in Toronto Global provider of add-ons and services customers worldwide Business.
Design Patterns D – Writing and Managing Content Lori Nuth February 20, 2006 EDIT 752.
ViewTrip White Label Sales Presentation. What is ViewTrip White Label? >ViewTrip White Label is a version of our web based ViewTrip product that enables.
XP Information Technology Center - KFUPM1 Microsoft Office FrontPage 2003 Creating a Web Site.
Web Content Management System Website Maintenance Demonstration Introduction to Macromedia Contribute Jamie Uprichard.
PHP (2) – Functions, Arrays, Databases, and sessions.
Jonathan Voigt University of Michigan Soar Workshop 25
The front door of the OACIS site includes: 1.General information 2.Funding information – active links concerning TICFIA 3.Contact links 4.Quick links –
HTML Companion. Lecture Objectives Learn about HTML. Know basic HTML tags.
Guide To UNIX Using Linux Third Edition
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Basics of HTML Shashanka Rao. Learning Objectives 1. HTML Overview 2. Head, Body, Title and Meta Elements 3.Heading, Paragraph Elements and Special Characters.
ECA 228 Internet/Intranet Design I Meta Tags & Directories.
Sophia Antipolis, September 2006 Multilinguality, localization and internationalization Miruna Bădescu Finsiel Romania.
Introduction: Drupal is a free and open-source content management system (CMS). A content management system(CMS) is a computer program that allows publishing,
Different ways to implement CSS. There are four different ways to use CSS in your web pages: – Inline CSS – Embedded CSS/Internal CSS – Linked CSS/External.
Simple Pages for Omeka Lauren Dzura LIS
REAL ESTATE INVENTORY SYSTEM Training Seminar - September 12, 2011, Bucharest, Romania Guidelines on how to work with the Promise System.
10 Adding Interactivity to a Web Site Section 10.1 Define scripting Summarize interactivity design guidelines Identify scripting languages Compare common.
1 JavaScript: Objects and Object Models October 25, 2005 Slides modified from Internet & World Wide Web: How to Program (3rd) edition. By Deitel,
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
The Semantic Web and Microformats. The Semantic Web Syntax = how you say something – Letters, words, punctuation Semantics = meaning behind what you say.
Microsoft Internet Explorer and the Internet Using Microsoft Explorer 5.
Personal Knowledge Management - SIIA 19 April 2006 Screenshots from Live Demo + Backup Greg Lloyd – President & Co-Founder Traction Software Inc. Providence,
CitiWiki Summer Workshop Day 1: Introduction Li Xu CS, UMass Lowell.
Introduction to MediaWiki EnhanceEdu, IIIT-Hyderabad 1.
Chapter 8 Introduction to HTML and Applets Fundamentals of Java.
1 RSS The Easy Way! Reading & Creating Feeds with Free and Easy to Use Tools Russell O’Neill General Services Administration Senior Software Engineer,
INTRODUCTORY Tutorial 1 Using HTML Tags to Create Web Pages.
Lesson 7 – World Wide Web. What is the World Wide Web?  The content of the worldwide web is held on individual web pages gathered together to form websites.
Web software. Two types of web software Browser software – used to search for and view websites. Web development software – used to create webpages/websites.
About These Slides This slide set is designed to be used with the OMA sample application It is recommended you follow the steps outlined in the “Preparing.
Space Management Access the Room Use Survey System (RUSS) from the Planning Group website.
Copenhagen, 6 June 2006 EC CHM Multilinguality Anton Cupcea Finsiel Romania.
Unicode Normalize Engine Submitted by: Jose Yallouz Shlomi Ben-Shabat Supervisor: Maxim Gurevich.
Common Terms in the Internet Adnan Iqbal MCS-MIT-WD-A+ The College of Law.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
Understanding Character Encodings Basics of Character Encodings that all Programmers should Know. Pritam Barhate, Cofounder and CTO Mobisoft Infotech.
INTRODUCTION JavaScript can make websites more interactive, interesting, and user-friendly.
Notes Test #2 will be held one week from this Thursday Check to see if you have a Vision account –Launch Netscape –Point & Click to location and type vision.
Introduction to HTML Simple facts yet crucial to beginning of study in fundamentals of web page design!
Web Design New Brighton High School Exploring the History of the World Wide WebWorld Wide Web.
Behind every site is a mix of special languages that your web browser understands The main way of describing any website is HTML HTML stands for Hyper.
1 PDMLink Application - User Features & Functions Module 6: Search Capabilities.
Chapter 8 Adding Multimedia Content to Web Pages HTML5 & CSS 7 th Edition.
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
HTML And the Internet. HTML and the Internet ► HTML: HyperText Markup Language  Language in which all pages on the web are written  Not Really a Programming.
EIONET Portal Tool Kit Miruna Bulandra Finsiel Romania Copenhagen, 28 May 2002.
Section 10.1 Define scripting
Project 1 Introduction to HTML.
Exploring Microsoft Word 2000
Web software.
PHP / MySQL Introduction
Using Access and the Web
Microsoft Office Illustrated
TWiki Tutorial – February 2005
3.06 Understand the use of direct marketing to attract attention and to build brand.
Creating a Successful Web Presence
Title: Tech Training Certificate: Ace of Initiative Program
3.06 Understand the use of direct marketing to attract attention and to build brand.
Semantic Soccer: Implementation on Semantic Wiki Platform
Introduction to HTML Simple facts yet crucial to beginning of study in fundamentals of web page design!
RSS RSS is an acronymn for Really Simple Syndication or Rich Site Summary. RSS (noun) - an XML format for distributing news headlines on the Web. RSS.
Presentation transcript:

Internationalization in PHP: PmWiki’s approach Dr. Patrick R. Michaud September 13, 2005

This presentation demonstrates internationalization (i18n) in PmWiki Introduction to PmWiki Implementing I18n in PmWiki Internationalization issues Unicode UTF-8 ISO CJKM

PmWiki is a wiki-based system for collaborative maintenance of websites A wiki allows editing via a web browser Uses simple markup (similar to ) Easy to create pages and links between pages

PmWiki is designed for needs of web and content administrators Easy to install and upgrade Simple configuration Skin capabilities Markup customization

PmWiki has an active user base mailing list subscribers Hundreds of sites globally 200+ “add-on” recipes 14 languages

Internationalization is often abbreviated “i18n” Internationalization 18 characters

We want to provide language-specific programmatic prompts

In PmWiki, all prompts are passed through a special formatting function $[Edit] - $[History] - $[Print] - $[Recent Changes] - $[Search] $[Page last modified on $LastModified] The $[phrase] sequence is a special marker used by PmWiki to indicate a translatable phrase

Translations for phrases are held in a global lookup table $XL = array( ‘Edit’ => ‘Editer’, ‘View’ => ‘Vue’, ‘Save’ => ‘Enregistrer’, …);

A special XL() function returns a phrase’s translation, or the phrase function XL($key) { global $XL; if (isset($XL[$key])) return $XL [$key]; return $key; } Phrases without a translation in the table are thus left in English.

Strings can be easily converted using a preg_replace() function XL($key) { global $XL; if (isset($XL[$key])) return $XL [$key]; return $key; } $str = preg_replace( '/ \\$\\[ ([^\\]]+) \\] /ex', "XL('$1'))", $str);

PmWiki allows the translation table to be loaded from wiki pages

Proper internationalization requires selecting an appropriate character set In HTML, specified in the or in tag Common choices: utf-8 (Unicode) iso (Latin-1) Best is to standardize on utf-8 if possible PHP can have difficulties with Unicode

Locales can be used for language- specific dates and times. $x = strftime(‘%c’, time); “Tue Sep 13 18:21: ” setlocale(‘fr_FR’); $x = strftime(‘%c’, time); “mar 13 sep :22:23”

Summary of i18n in PmWiki Simple translation table for phrase => translation Phrase keys as printable values Select proper encoding type and locale