SlideShare a Scribd company logo
Supporting
Arab* in your
web apps
‫ة‬َّ‫ي‬ِ‫ب‬َ‫ر‬َ‫ع‬‫ال‬
* And other languages
2
Gil Faria
engineering manager
@gilfria | gil.faria@gmail.com
Let’s Begin
don’t forget the
disclaimers
who he is
Lead software
engineer with about a
decade of experience.
Works for a midsize
company
Meet Brian
who he thinks he is
Ninja. Samurai. Jedi.
Eats bits for breakfast,
CPU cycles for lunch
and threads for dinner.
Basically the very best
software engineer in
the world!
4
who he is
Brian’s boss.
Manages the
department of
software development.
Has an engineering
background but hasn’t
been in the field for
quite a while.
Meet John
who he thinks he is
The guy in control, a
born leader.
The Nelson Mandela in
the software industry.
5
“
Brian, we need to develop
a web site for our new
business idea:
6
“The Awesome Site that Sells
Everything”
TASSE
The team
proposal
team vision
We should use
Node, Ruby,
Python,
Angular,
Vue.js, React,
.NET
reality
We can’t
diversify
technologies
so Brian
breaks the
vibe by
imposing the
companies’
tech stack.
the app
Microsoft
ASP.NET MVC
for the
portuguese
market
7
this is huge
We should support
multiple languages.
We have to prepare
our application for
future expansion.
The Solution
but what is...
- Internationalization
- localization
- globalization
- localizability
- I18n
- i10n
- L12y
- G11N
8
Internationalization
“... design and development of a product,
application or document content that
enables easy localization for target
audiences that vary in culture, region, or
language.”
9
i18n
globalization
Localization
“... the adaptation of a product, application
or document content to meet the
language, cultural and other requirements
of a specific target market (a locale)...”
10
l10n
Demo
first web app
1
Big success
After a few sprints the team launched the app and it
went viral
12
Launching v1.0
“
Brian, we need to expand
our market reach
13
“TASSE needs to be in english,
Yesterday!”
But Brian was
prepared
The team had already prepared the
app (internationalization, right?)
14
And guess what? Brian and the team
know english!
“You are very white… put tha kream”
Now, they need to localize.
Big success
A short while after TASSE was localized for english
15
Launching v1.1
The board
decides to
expand the
business
16
TASSE
Expansion
English
Portuguese French
New Languages Needed
And Brian is ready...
Another localization project.
17
And guess what? Brian and the team
know french!
“Bonjour…. Merci… err”
Ok, they don’t know french, but
google knows!
Big sh!t
* number of tickets created with problems found with
translations (most were detected by clients)
18
*
Launching v1.2
Translations
“The French phrase "Se taper le cul par terre"
means to laugh uproariously.
According to Google Translate, though, it
means "Ass banging on the floor".
There is literally no end to the disasters that
could arise from this misunderstanding.”
19
Importance of Context
20
Try to translate this English word into another language
“Record”
Does Record refer to:
- the action of recording something?
- the product?
- the highest score in a game?
The problem
Brian decides to
create a new
database for TASSE,
which is responsible
for collecting and
delivering all
translation strings.
Looking for a Solution
Organization
Translation issues are
pushed out of the
engineering realm.
They can outsource
the translations.
Translators have
control of what to
translate in the right
context
21
After a few sprints
They created a new back office app, used internally, for the
translators.
From now on, all the translations where out of the
engineering scope.
22
Languages added
New languages were added
○ Italian
○ German
○ Spanish
Things were pretty normal
23
Big success
A short while after TASSE was localized in a few more
languages. Life is good.
24
Launching v1.x
“
Brian, we need to include
Arabic into TASSE
25
“It’s written from right to left!”
And Brian is ready
(of course)...
He thinks he knows all about RTL and
Arabic.
After all, the team had already added
a whole bunch of languages to the
site!!!
26
“Boss, I’ve already read about
this! The browser handles it all!”
Demo
RTL and the DOM
2
“
Let’s play it safe
28
John, this time, was cautious and
contracted a native speaking
consultant
Born and raised in Saudi Arabia.
The external consultant
29
Meet Amir
30 Modern Varieties
Ex: Some varieties from
Northern Africa are
incomprehensible to an
Arabic speaker in the Persian
gulf
Modern Standard Arabic
MSA - a formal language
Based on classic arabe
Learned at school 30
Arabic
31
Arabic Alphabet
It is written from right to left in a
cursive style and includes 28
letters. Most letters have more
than one shape.
Pluralization
32
English has two rules
1 day
2 days
1.5 days
Arabic has six rules
٠‫كتاب‬
‫ولد‬‫واحد‬‫حضر‬
‫ولدان‬‫حضرا‬
٣‫أوالد‬‫حضروا‬
١١‫ًا‬‫د‬‫ول‬‫حضروا‬
١٠٠‫ولد‬‫حضروا‬
0
1
2
n % 100 = 3..10
n % 100 = 11..99
100~102, 200~202, ...
33
What happens to images?
34
Are All images mirrored?
What about video?
35
Applying changes
Manually
explicitly write
rules for RTL and
LTR
CSS post-
processing (e.g.
with PostCSS.)
postcss-rtl
duplicates each
needed rule, with
selector for rtl/ltr
[dir=ltr] .foo
[dir=rtl] .foo
rtlcss
rewrites file
Less/Sass pre-processing
replace *-left/*-right
properties with functions
requires rewriting the
original files
if-ltr('left-to-right',
'right-to-left');
@include if-ltr {
p {
// some css...
}
}
36
Demo
RTLCSS
3
So is Arabic text RTL?
38
No
It’s actually bidi
Yes
bidirectional
Arabic is bidi
39
Translates to
The presence of the new USB 3.1 or USB Type-C in some phones this year was
a warning that this standard will be present on all telephones next year at
least high-end phones.
Unicode Bidirectional Algorithm
40
bidi algorithm
is part of the Unicode
Standard
widely supported by
web browsers and
other applications
base direction
we need to establish the
directional context of that text
dir attribute, or, in absence
inherited from the default
direction of the document,
which is left-to-right (LTR).
BIDI ALGORITHM BASICS
41
Directional runs
text is displayed
depends on the base
direction assigned
<p dir="ltr">bahrain ‫مصر‬kuwait</p>
<p dir="rtl">bahrain ‫مصر‬kuwait</p>
Characters may be
- strongly typed (letters)
- weak/neutral (numbers,
punctuation)
Let’s make this more exciting
42
spaces and punctuation are classed as neutral or weak characters
between two strongly typed characters with same directional type
assume that directionality
egypt, kuwait
LTR
<p dir="ltr">egypt, kuwait</p>
Neutral or weak characters
43
between two strongly typed characters with different directionality
same direction as the prevailing base direction.
egypt, ‫,البحرين‬ kuwait
LTR RTL LTR
<p dir="ltr">egypt, ‫,البحرين‬ kuwait</p>
LTRRTLLTR
Run direction changes
44
Hello World! is ! ‫مرحبا‬‫بالعالم‬ in Arabic
<p>Hello World! is <span dir="rtl"> ‫مفتاحمرحبا‬‫بالعالم‬ !</span>
in Arabic. </p>
<p>Hello World! is ‫مفتاحمرحبا‬‫بالعالم‬ ! in Arabic.</p>
at times it’s essential to change the direction run
What about numbers?
45
Weak characters don’t break
directional runs
Numbers are LTR even in RTL runs
Demo
Working with bidi
4
47
Editors with bidi support
48
Do Not
Atom
Visual Studio (PC + MAC)
Visual Studio Code (PC +
MAC)
Sublime text
Do
Emacs
Notepad++ (meh!)
Vim
TextEdit (MAC)
Back to Brian
After a while, the team managed to add
another language.
49
Are they ready to launch another stable
version?
ARABIC
Big success
just a few minor issues...
50
Launching V.1.8
51
TASSE is a market
leader
Everyone’s happy!
<- SEE ->
52
And they all lived
happily ever after!
53
Always Use UTF-8 (or UTF-16 for asian languages) and nvarchar for the Database
Create localizable strings
● Don't assume grammar structures $“{singular} {plural}s”
● Don’t concatenate strings
● Date, time, units formats (don’t hard code structure) $“{day}{month}{year}”
● Don't reuse strings in different contexts
● Don't hardcode characters not even white spaces, commas, or other separators
Don’t forget
When translating, context is crucial
How About
a Test?
?
55
What’s wrong with this text?
there’s letter-spacing! it must be disabled
(thank you so much for coming)
Thank you!
Any Questions?
@gilfria
gil.faria@gmail.com
‫شكرا‬
57

More Related Content

Similar to Going Arabic @ pixels camp 2019

Linux Sucks
Linux SucksLinux Sucks
Linux Sucks
guestbf75fcc
 
Linux Sucks
Linux SucksLinux Sucks
Linux Sucks
guest5a2c29
 
E4IT STARTER - MODULE 12.pdf
E4IT STARTER - MODULE 12.pdfE4IT STARTER - MODULE 12.pdf
E4IT STARTER - MODULE 12.pdf
Anna Gandrabura
 
Linux Sucks
Linux SucksLinux Sucks
Linux Sucks
papygeek
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLC
Abdul Karim
 
The REAL Angular Keynote
The REAL Angular KeynoteThe REAL Angular Keynote
The REAL Angular Keynote
Lukas Ruebbelke
 
whatiscodingslideshare-180406204414.pptx
whatiscodingslideshare-180406204414.pptxwhatiscodingslideshare-180406204414.pptx
whatiscodingslideshare-180406204414.pptx
Kanden ARMOOGUM
 
The Ring programming language version 1.9 book - Part 6 of 210
The Ring programming language version 1.9 book - Part 6 of 210The Ring programming language version 1.9 book - Part 6 of 210
The Ring programming language version 1.9 book - Part 6 of 210
Mahmoud Samir Fayed
 
iOS Localization
iOS LocalizationiOS Localization
iOS Localization
Dierk Seeburg
 
The 10 Commandments of Building Global Software
The 10 Commandments of Building Global SoftwareThe 10 Commandments of Building Global Software
The 10 Commandments of Building Global Software
Andrey Akselrod
 
What is Coding
What is CodingWhat is Coding
What is Coding
RoboGarden
 
Building DSLs: Marriage of High Essence and Groovy Metaprogramming
Building DSLs: Marriage of High Essence and Groovy MetaprogrammingBuilding DSLs: Marriage of High Essence and Groovy Metaprogramming
Building DSLs: Marriage of High Essence and Groovy Metaprogramming
Skills Matter
 
How To Build And Launch A Successful Globalized App From Day One Or All The ...
How To Build And Launch A Successful Globalized App From Day One  Or All The ...How To Build And Launch A Successful Globalized App From Day One  Or All The ...
How To Build And Launch A Successful Globalized App From Day One Or All The ...
agileware
 
Quality code 2019
Quality code 2019Quality code 2019
Quality code 2019
Michael Durrant
 
Unit-1 Part2.pptawegawegawergawewrrgawewgd
Unit-1 Part2.pptawegawegawergawewrrgawewgdUnit-1 Part2.pptawegawegawergawewrrgawewgd
Unit-1 Part2.pptawegawegawergawewrrgawewgd
saiyangodyajat
 
About programming languages
About programming languagesAbout programming languages
About programming languages
Ganesh Samarthyam
 
What if-your-application-could-speak, by Marcos Silveira
What if-your-application-could-speak, by Marcos SilveiraWhat if-your-application-could-speak, by Marcos Silveira
What if-your-application-could-speak, by Marcos Silveira
Thoughtworks
 
What if-your-application-could-speak
What if-your-application-could-speakWhat if-your-application-could-speak
What if-your-application-could-speak
Marcos Vinícius
 
Internationalizing Your Apps
Internationalizing Your AppsInternationalizing Your Apps
Internationalizing Your Apps
John Wilker
 
APU RoR Workshop Series #1 - Introduction to Programming
APU RoR Workshop Series #1 - Introduction to ProgrammingAPU RoR Workshop Series #1 - Introduction to Programming
APU RoR Workshop Series #1 - Introduction to Programming
Jimmy Ngu
 

Similar to Going Arabic @ pixels camp 2019 (20)

Linux Sucks
Linux SucksLinux Sucks
Linux Sucks
 
Linux Sucks
Linux SucksLinux Sucks
Linux Sucks
 
E4IT STARTER - MODULE 12.pdf
E4IT STARTER - MODULE 12.pdfE4IT STARTER - MODULE 12.pdf
E4IT STARTER - MODULE 12.pdf
 
Linux Sucks
Linux SucksLinux Sucks
Linux Sucks
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLC
 
The REAL Angular Keynote
The REAL Angular KeynoteThe REAL Angular Keynote
The REAL Angular Keynote
 
whatiscodingslideshare-180406204414.pptx
whatiscodingslideshare-180406204414.pptxwhatiscodingslideshare-180406204414.pptx
whatiscodingslideshare-180406204414.pptx
 
The Ring programming language version 1.9 book - Part 6 of 210
The Ring programming language version 1.9 book - Part 6 of 210The Ring programming language version 1.9 book - Part 6 of 210
The Ring programming language version 1.9 book - Part 6 of 210
 
iOS Localization
iOS LocalizationiOS Localization
iOS Localization
 
The 10 Commandments of Building Global Software
The 10 Commandments of Building Global SoftwareThe 10 Commandments of Building Global Software
The 10 Commandments of Building Global Software
 
What is Coding
What is CodingWhat is Coding
What is Coding
 
Building DSLs: Marriage of High Essence and Groovy Metaprogramming
Building DSLs: Marriage of High Essence and Groovy MetaprogrammingBuilding DSLs: Marriage of High Essence and Groovy Metaprogramming
Building DSLs: Marriage of High Essence and Groovy Metaprogramming
 
How To Build And Launch A Successful Globalized App From Day One Or All The ...
How To Build And Launch A Successful Globalized App From Day One  Or All The ...How To Build And Launch A Successful Globalized App From Day One  Or All The ...
How To Build And Launch A Successful Globalized App From Day One Or All The ...
 
Quality code 2019
Quality code 2019Quality code 2019
Quality code 2019
 
Unit-1 Part2.pptawegawegawergawewrrgawewgd
Unit-1 Part2.pptawegawegawergawewrrgawewgdUnit-1 Part2.pptawegawegawergawewrrgawewgd
Unit-1 Part2.pptawegawegawergawewrrgawewgd
 
About programming languages
About programming languagesAbout programming languages
About programming languages
 
What if-your-application-could-speak, by Marcos Silveira
What if-your-application-could-speak, by Marcos SilveiraWhat if-your-application-could-speak, by Marcos Silveira
What if-your-application-could-speak, by Marcos Silveira
 
What if-your-application-could-speak
What if-your-application-could-speakWhat if-your-application-could-speak
What if-your-application-could-speak
 
Internationalizing Your Apps
Internationalizing Your AppsInternationalizing Your Apps
Internationalizing Your Apps
 
APU RoR Workshop Series #1 - Introduction to Programming
APU RoR Workshop Series #1 - Introduction to ProgrammingAPU RoR Workshop Series #1 - Introduction to Programming
APU RoR Workshop Series #1 - Introduction to Programming
 

Recently uploaded

SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 

Recently uploaded (20)

SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 

Going Arabic @ pixels camp 2019

  • 1. Supporting Arab* in your web apps ‫ة‬َّ‫ي‬ِ‫ب‬َ‫ر‬َ‫ع‬‫ال‬ * And other languages
  • 4. who he is Lead software engineer with about a decade of experience. Works for a midsize company Meet Brian who he thinks he is Ninja. Samurai. Jedi. Eats bits for breakfast, CPU cycles for lunch and threads for dinner. Basically the very best software engineer in the world! 4
  • 5. who he is Brian’s boss. Manages the department of software development. Has an engineering background but hasn’t been in the field for quite a while. Meet John who he thinks he is The guy in control, a born leader. The Nelson Mandela in the software industry. 5
  • 6. “ Brian, we need to develop a web site for our new business idea: 6 “The Awesome Site that Sells Everything” TASSE
  • 7. The team proposal team vision We should use Node, Ruby, Python, Angular, Vue.js, React, .NET reality We can’t diversify technologies so Brian breaks the vibe by imposing the companies’ tech stack. the app Microsoft ASP.NET MVC for the portuguese market 7
  • 8. this is huge We should support multiple languages. We have to prepare our application for future expansion. The Solution but what is... - Internationalization - localization - globalization - localizability - I18n - i10n - L12y - G11N 8
  • 9. Internationalization “... design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language.” 9 i18n globalization
  • 10. Localization “... the adaptation of a product, application or document content to meet the language, cultural and other requirements of a specific target market (a locale)...” 10 l10n
  • 12. Big success After a few sprints the team launched the app and it went viral 12 Launching v1.0
  • 13. “ Brian, we need to expand our market reach 13 “TASSE needs to be in english, Yesterday!”
  • 14. But Brian was prepared The team had already prepared the app (internationalization, right?) 14 And guess what? Brian and the team know english! “You are very white… put tha kream” Now, they need to localize.
  • 15. Big success A short while after TASSE was localized for english 15 Launching v1.1
  • 16. The board decides to expand the business 16 TASSE Expansion English Portuguese French New Languages Needed
  • 17. And Brian is ready... Another localization project. 17 And guess what? Brian and the team know french! “Bonjour…. Merci… err” Ok, they don’t know french, but google knows!
  • 18. Big sh!t * number of tickets created with problems found with translations (most were detected by clients) 18 * Launching v1.2
  • 19. Translations “The French phrase "Se taper le cul par terre" means to laugh uproariously. According to Google Translate, though, it means "Ass banging on the floor". There is literally no end to the disasters that could arise from this misunderstanding.” 19
  • 20. Importance of Context 20 Try to translate this English word into another language “Record” Does Record refer to: - the action of recording something? - the product? - the highest score in a game?
  • 21. The problem Brian decides to create a new database for TASSE, which is responsible for collecting and delivering all translation strings. Looking for a Solution Organization Translation issues are pushed out of the engineering realm. They can outsource the translations. Translators have control of what to translate in the right context 21
  • 22. After a few sprints They created a new back office app, used internally, for the translators. From now on, all the translations where out of the engineering scope. 22
  • 23. Languages added New languages were added ○ Italian ○ German ○ Spanish Things were pretty normal 23
  • 24. Big success A short while after TASSE was localized in a few more languages. Life is good. 24 Launching v1.x
  • 25. “ Brian, we need to include Arabic into TASSE 25 “It’s written from right to left!”
  • 26. And Brian is ready (of course)... He thinks he knows all about RTL and Arabic. After all, the team had already added a whole bunch of languages to the site!!! 26 “Boss, I’ve already read about this! The browser handles it all!”
  • 28. “ Let’s play it safe 28 John, this time, was cautious and contracted a native speaking consultant
  • 29. Born and raised in Saudi Arabia. The external consultant 29 Meet Amir
  • 30. 30 Modern Varieties Ex: Some varieties from Northern Africa are incomprehensible to an Arabic speaker in the Persian gulf Modern Standard Arabic MSA - a formal language Based on classic arabe Learned at school 30 Arabic
  • 31. 31 Arabic Alphabet It is written from right to left in a cursive style and includes 28 letters. Most letters have more than one shape.
  • 32. Pluralization 32 English has two rules 1 day 2 days 1.5 days Arabic has six rules ٠‫كتاب‬ ‫ولد‬‫واحد‬‫حضر‬ ‫ولدان‬‫حضرا‬ ٣‫أوالد‬‫حضروا‬ ١١‫ًا‬‫د‬‫ول‬‫حضروا‬ ١٠٠‫ولد‬‫حضروا‬ 0 1 2 n % 100 = 3..10 n % 100 = 11..99 100~102, 200~202, ...
  • 34. 34 Are All images mirrored?
  • 36. Applying changes Manually explicitly write rules for RTL and LTR CSS post- processing (e.g. with PostCSS.) postcss-rtl duplicates each needed rule, with selector for rtl/ltr [dir=ltr] .foo [dir=rtl] .foo rtlcss rewrites file Less/Sass pre-processing replace *-left/*-right properties with functions requires rewriting the original files if-ltr('left-to-right', 'right-to-left'); @include if-ltr { p { // some css... } } 36
  • 38. So is Arabic text RTL? 38 No It’s actually bidi Yes bidirectional
  • 39. Arabic is bidi 39 Translates to The presence of the new USB 3.1 or USB Type-C in some phones this year was a warning that this standard will be present on all telephones next year at least high-end phones.
  • 40. Unicode Bidirectional Algorithm 40 bidi algorithm is part of the Unicode Standard widely supported by web browsers and other applications base direction we need to establish the directional context of that text dir attribute, or, in absence inherited from the default direction of the document, which is left-to-right (LTR).
  • 41. BIDI ALGORITHM BASICS 41 Directional runs text is displayed depends on the base direction assigned <p dir="ltr">bahrain ‫مصر‬kuwait</p> <p dir="rtl">bahrain ‫مصر‬kuwait</p> Characters may be - strongly typed (letters) - weak/neutral (numbers, punctuation)
  • 42. Let’s make this more exciting 42 spaces and punctuation are classed as neutral or weak characters between two strongly typed characters with same directional type assume that directionality egypt, kuwait LTR <p dir="ltr">egypt, kuwait</p>
  • 43. Neutral or weak characters 43 between two strongly typed characters with different directionality same direction as the prevailing base direction. egypt, ‫,البحرين‬ kuwait LTR RTL LTR <p dir="ltr">egypt, ‫,البحرين‬ kuwait</p>
  • 44. LTRRTLLTR Run direction changes 44 Hello World! is ! ‫مرحبا‬‫بالعالم‬ in Arabic <p>Hello World! is <span dir="rtl"> ‫مفتاحمرحبا‬‫بالعالم‬ !</span> in Arabic. </p> <p>Hello World! is ‫مفتاحمرحبا‬‫بالعالم‬ ! in Arabic.</p> at times it’s essential to change the direction run
  • 45. What about numbers? 45 Weak characters don’t break directional runs Numbers are LTR even in RTL runs
  • 47. 47
  • 48. Editors with bidi support 48 Do Not Atom Visual Studio (PC + MAC) Visual Studio Code (PC + MAC) Sublime text Do Emacs Notepad++ (meh!) Vim TextEdit (MAC)
  • 49. Back to Brian After a while, the team managed to add another language. 49 Are they ready to launch another stable version? ARABIC
  • 50. Big success just a few minor issues... 50 Launching V.1.8
  • 51. 51 TASSE is a market leader Everyone’s happy! <- SEE ->
  • 52. 52 And they all lived happily ever after!
  • 53. 53 Always Use UTF-8 (or UTF-16 for asian languages) and nvarchar for the Database Create localizable strings ● Don't assume grammar structures $“{singular} {plural}s” ● Don’t concatenate strings ● Date, time, units formats (don’t hard code structure) $“{day}{month}{year}” ● Don't reuse strings in different contexts ● Don't hardcode characters not even white spaces, commas, or other separators Don’t forget When translating, context is crucial
  • 55. 55 What’s wrong with this text? there’s letter-spacing! it must be disabled (thank you so much for coming)
  • 57. 57

Editor's Notes

  1. Globalization (G11N): The process of making an app support different languages and regions. Localization (L10N): The process of customizing an app for a given language and region.
  2. Internationalization significantly affects the ease of the product's localization. Retrofitting a linguistically- and culturally-centered deliverable for a global market is obviously much more difficult and time-consuming than designing a deliverable with the intent of presenting it globally.
  3. Localizability - L12y Localization (L10N): The process of customizing an app for a given language and region.
  4. excellent, formidable, find very funny. Uma coisa muito engraçada https://translate.google.pt/#fr/en/Se%20taper%20le%20cul%20par%20terre https://dictionnaire.reverso.net/francais-definition/%C3%A0+se+taper+le+cul+par+terre
  5. https://www.google.pt/search?q=localization+issues+in+vairuos+lanugafges&oq=localization+issues+in+vairuos+lanugages&aqs=chrome..69i57.10373j0j7&sourceid=chrome&ie=UTF-8
  6. Show that images and glyphs don’t change! We need more than the dir attrib
  7. http://www.unicode.org/cldr/charts/29/supplemental/language_plural_rules.html
  8. https://material.io/guidelines/usability/bidirectionality.html
  9. https://www.youtube.com/watch?v=TigrPM1FLpA
  10. https://www.w3.org/International/articles/inline-bidi-markup/uba-basics
  11. Bahrein, Egito, Kuwait
  12. baraheim
  13. Hello {0}, welcome back! مرحبًا {0}، مرحبًا بك مرة أخرى!
  14. https://en.wikipedia.org/wiki/Comparison_of_text_editors
  15. https://www.google.pt/search?q=localization+issues+in+vairuos+lanugafges&oq=localization+issues+in+vairuos+lanugages&aqs=chrome..69i57.10373j0j7&sourceid=chrome&ie=UTF-8
  16. UTF-8 can accurately represent the entire Unicode range of characters, but it is optimized for text that is mostly ASCII. UTF-16 is space-efficient over the entire Basic Multilingual Plane
  17. Thank you netponto, hope you enjoyed the event
  18. shukraan lakum!