SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
MessageFormat
The future of i18n on the web
Ujjwal Sharma (@ryzokuken)
FOSDEM 2024, Brussels 󰎐
Bienvenue!
Welkom!
Willkommen!
i18n.t(‘welcome’)
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
About Me
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
Ujjwal Sharma (ryzokuken)
from New Delhi, India
based out of A Coruña, Galiza
OSS zealot, open web maximalist
love dogs, (masochistic) videogames
work at Igalia
About Igalia
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
An open-source consultancy
A worker-owned cooperative
Extensive work across major open source projects and ecosystems
Linux kernel, userspace and multimedia
Major contributor in the web platform and browser projects
Compilers (JS engines, LLVM) and PL design (WASM, JS)
A (now) general purpose
programming language
designed primarily for
scripting web interfaces.
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
Stage One:
Initially, the sign (image or
representation) is a reflection
of basic reality.
Stage Two:
The sign masks a basic reality.
The image becomes a
distortion of reality.
Stage Three:
The sign marks the absence of
basic reality. The image calls
into question what the reality
is and if it even exists.
Stage Four:
The sign bears no relation to
any reality whatsoever; it is its
own pure simulacrum.
What is the “web” platform?
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
An interactive, decentralized communication platform at the scale of
the entire human civilization.
A standard platform for widely accessible and rich user interfaces.
The ambition of universality is inherently built into it and like all
platforms for UIs, it’s required to be accessible and localizable.
Quick note
Internationalization (aka i18n) is the practice of designing a system
in such a way that it can easily be adapted for different target
audiences, that may vary in region, language, or culture.
The complementary process of adapting a system for a specific
target audience is called Localization (aka l10n).
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
Early attempts at i18n
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
UIs are composed of string content, called “Messages”.
Manual localization was attempted but quickly proved
unmanageable.
The actual diversity of locales could never be catered to.
To promote a better and cleaner approach, C developers hacked
up gettext in 1988.
Let’s talk about gettext
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
gettext was one of the two i18n systems in glibc (the other being catgets).
Despite not being standardized, its adoption by Sun and GNU made gettext a hit.
Mainly dealt with static string replacement, but also provided basic plural selection.
Went on to inspire i18n tooling in all relevant areas:
● Python’s gettext
● Java’s MessageFormat (starting in 1996 at Sun)
● ICU MessageFormat (plurals, selection and nesting)
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
"There {0,n,0#are no files|1#is one file|1<are {0,number,integer} files}."
There are no files.
There is one file.
There are 1337 files.
ICU MessageFormat
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
Rethink the fundamentals, including
taking inspiration from catgets.
Designed with feedback from
implementers and translators at the
forefront.
Greatly expanded abilities, format
complexity, opening up an entirely new
space for innovation.
ICU MessageFormat
(plural and select)
Java MessageFormat
(pattern strings, format
basic types, choice
format)
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
"{pronouns_of_host, select, "
"feminine {"
"{num_guests, plural, offset:1 "
"=0 {{host} does not give a party.}"
"=1 {{host} invites {guest} to her party.}"
"=2 {{host} invites {guest} and one other person to her party.}"
"other {{host} invites {guest} and # other people to her party.}}}"
"masculine {"
"{num_guests, plural, offset:1 "
"=0 {{host} does not give a party.}"
"=1 {{host} invites {guest} to his party.}"
"=2 {{host} invites {guest} and one other person to his party.}"
"other {{host} invites {guest} and # other people to his party.}}}"
"other {"
"{num_guests, plural, offset:1 "
"=0 {{host} does not give a party.}"
"=1 {{host} invites {guest} to their party.}"
"=2 {{host} invites {guest} and one other person to their party.}"
"other {{host} invites {guest} and # other people to their party.}}}}"
The good ‘ol web
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
The early days of the web were dominated by documents or very static CRUD apps.
Early websites relied almost entirely on server runtimes for their content.
Via Java’s java.text, PHP’s Intl and RoR’s i18n, web developers started
tinkering with message formatting, ICU enabled the rest.
With a combination of message formatting, templating languages and HTTP
content negotiation, we reach the first important milestone for i18n on the web.
Them pesky JS developers
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
Due to various reasons, JS remained largely unpopular for almost an entire decade.
jQuery was released in 2006, sparking a whole new era of experimentation.
Fast forward 10 years and we live in an era of SPAs and dynamic web experiences.
TC39 formulated TC39-TG2 to add Internationalization features to JavaScript.
Modern JS interfaces utilize these features to format and display info on the fly.
The state of i18n on the web
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
Outside JS’s Intl, important work includes supporting more writing
systems and keyboard layouts.
Intl has gradually grown to provide most of the building blocks we need
● Formatters (Numbers, Date/time, Lists, Durations, …)
● Collator
● Segmenter
● Plural and ordinal selection
There’s one big missing piece…
Timeline of MessageFormat 2
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
2020-01
WG reorganized under
Unicode CLDR-TC
2019-07
MF WG first organized
under TC39-TG2
2016-07
Discussion under
tc39/ecma402#92
2013-04
Initial strawperson
proposed and discussed
"{pronouns_of_host, select, "
"feminine {"
"{num_guests, plural, offset:1 "
"=0 {{host} does not give a party.}"
"=1 {{host} invites {guest} to her party.}"
"=2 {{host} invites {guest} and one other person to her party.}"
"other {{host} invites {guest} and # other people to her party.}}}"
"masculine {"
"{num_guests, plural, offset:1 "
"=0 {{host} does not give a party.}"
"=1 {{host} invites {guest} to his party.}"
"=2 {{host} invites {guest} and one other person to his party.}"
"other {{host} invites {guest} and # other people to his party.}}}"
"other {"
"{num_guests, plural, offset:1 "
"=0 {{host} does not give a party.}"
"=1 {{host} invites {guest} to their party.}"
"=2 {{host} invites {guest} and one other person to their party.}"
"other {{host} invites {guest} and # other people to their party.}}}}"
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
Me: Mom, can we have MessageFormat?
Mom: No, we have MessageFormat in ICU.
MessageFormat in ICU:
The need for a new
MessageFormat
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
It’s based on an old design which can’t adapt to modern tools and
interactions, like dynamic UI frameworks.
Lack of modularity and extensibility.
Can’t deprecate anything, stuck with legacy features.
Diversity of locales makes it impossible to map core l10n structures 1:1.
Plaintext, imperative API style makes it quite limited.
Need to subsume functionality from non-standard (proprietary) tooling.
A quick and clumsy intro
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
A dynamic message string is a string whose content changes due to the
value of or insertion of some data value or values.
MF2 intends to excel at complex use cases while keeping the basics
simple.
● Text mode first
● Complex messages and expressions
● Declarations and annotations (functions, private use)
● Function registry and builtins
Simple and Complex messages
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
This is a message.
Hello, {$userName}!
.match {$userType :equals}
registered {{Welcome {$username}!}}
guest {{Welcome Guest!}}
* {{Welcome!}}
SIMPLE
EXPRESSION
COMPLEX
How expressive can they be
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
The match on {$date :datetime dateStyle=long} is cancelled.
Check out {#img src=|image.png|/}.
.input {$date :datetime weekday=long month=medium day=short}
.local $numPigs = {$pigs :integer}
{{On {$date} you had this many pigs: {$numPigs}}}
FUNCTIONS
MARKUP
DECLARATIONS
Wait, there’s more?
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
An extensible function registry.
Popular built-in formatters and selectors
● Date/time, durations?
● Numbers, integers
● Plural and ordinal selection
● Lists
"{pronouns_of_host, select, "
"feminine {"
"{num_guests, plural, offset:1 "
"=0 {{host} does not give a party.}"
"=1 {{host} invites {guest} to her party.}"
"=2 {{host} invites {guest} and one other person to her party.}"
"other {{host} invites {guest} and # other people to her party.}}}"
"masculine {"
"{num_guests, plural, offset:1 "
"=0 {{host} does not give a party.}"
"=1 {{host} invites {guest} to his party.}"
"=2 {{host} invites {guest} and one other person to his party.}"
"other {{host} invites {guest} and # other people to his party.}}}"
"other {"
"{num_guests, plural, offset:1 "
"=0 {{host} does not give a party.}"
"=1 {{host} invites {guest} to their party.}"
"=2 {{host} invites {guest} and one other person to their party.}"
"other {{host} invites {guest} and # other people to their party.}}}}"
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
Remember this?
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
.match {$guestCount :number offset=1} {$hostPronouns :equals}
0 * {{{$host} does not give a party.}}
1 feminine {{{$host} invites {$guest} to her party.}}
1 masculine {{{$host} invites {$guest} to his party.}}
1 * {{{$host} invites {$guest} to their party.}}
2 feminine {{{$host} invites {$guest} and one other to her party.}}
2 masculine {{{$host} invites {$guest} and one other to his party.}}
2 * {{{$host} invites {$guest} and one other their party.}}
* feminine {{{$host} invites {$guest} and # others to her party.}}
* masculine {{{$host} invites {$guest} and # others to his party.}}
* * {{{$host} invites {$guest} and # others their party.}}
Why does any of this matter
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
i
1
8
n
,
M
F
UI design
W
eb
Platform
Intl.MF, MF2
J
a
v
a
S
c
r
i
p
t
Intl’s MessageFormat
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
We finally brought Intl.MessageFormat back to committee!
Accepted to Stage 1 in March 2022 (and hopefully Stage 2 soon).
Built on top of familiar Intl design patterns and plans to integrate formatters.
const mf = new Intl.MessageFormat('Hello!', 'es');
mf.format(); // 'Hola!'
Challenges
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
Obviously we’re not done yet, delays, indecision.
The plethora of stakeholders and requirements could overcomplicate design.
Lack of user attention and feedback.
Lack of stability and direction.
Difficult to have your cake and eat it too, but we try.
Get involved
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024
Standard, format and data model:
https://github.com/unicode-org/message-format-wg/
JavaScript proposal:
https://github.com/tc39/proposal-intl-messageformat
Find us on GitHub and Matrix!
Merci!
Bedankt!
Danke schön!
i18n.t(‘thanks’)
MessageFormat: The future of i18n on the web
Ujjwal Sharma (@ryzokuken), FOSDEM 2024

Contenu connexe

Similaire à MessageFormat: The future of i18n on the web

Actor Model and C++: what, why and how? (March 2020 Edition)
Actor Model and C++: what, why and how? (March 2020 Edition)Actor Model and C++: what, why and how? (March 2020 Edition)
Actor Model and C++: what, why and how? (March 2020 Edition)Yauheni Akhotnikau
 
Lilypad @ Labweek, Istanbul, 2023.pdf
Lilypad @ Labweek, Istanbul, 2023.pdfLilypad @ Labweek, Istanbul, 2023.pdf
Lilypad @ Labweek, Istanbul, 2023.pdfAlly339821
 
GurgaonPoliceSummerCyberSecurityInternship
GurgaonPoliceSummerCyberSecurityInternshipGurgaonPoliceSummerCyberSecurityInternship
GurgaonPoliceSummerCyberSecurityInternshipMandeep Singh Kapoor
 
You got database in my cloud!
You got database  in my cloud!You got database  in my cloud!
You got database in my cloud!Liz Frost
 
C Interview Basic Q&A- 1
C Interview Basic Q&A- 1C Interview Basic Q&A- 1
C Interview Basic Q&A- 1Jyoti Rawat
 
[CIbSE2023] Cross-language clone detection for Mobile Apps
[CIbSE2023] Cross-language clone detection for Mobile Apps[CIbSE2023] Cross-language clone detection for Mobile Apps
[CIbSE2023] Cross-language clone detection for Mobile AppsUniversidad de los Andes
 
Sse Vw Pestel Group8
Sse Vw Pestel Group8Sse Vw Pestel Group8
Sse Vw Pestel Group8guest6bcd104
 
Deep Learning to Text
Deep Learning to TextDeep Learning to Text
Deep Learning to TextJian-Kai Wang
 
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...ITCamp
 
Internationlization
InternationlizationInternationlization
InternationlizationTuan Ngo
 
Why the embedded world needs open source communities
Why the embedded world needs open source communitiesWhy the embedded world needs open source communities
Why the embedded world needs open source communitiesPhilippe Krief
 
Actor Model and C++: what, why and how?
Actor Model and C++: what, why and how?Actor Model and C++: what, why and how?
Actor Model and C++: what, why and how?Yauheni Akhotnikau
 
Developing Your Own Flux Packages by David McKay | Head of Developer Relation...
Developing Your Own Flux Packages by David McKay | Head of Developer Relation...Developing Your Own Flux Packages by David McKay | Head of Developer Relation...
Developing Your Own Flux Packages by David McKay | Head of Developer Relation...InfluxData
 
Virtual enterprise synthesys
 Virtual enterprise synthesys Virtual enterprise synthesys
Virtual enterprise synthesysVictor Romanov
 
i18n was the missing piece_ make your apps accessible to 70%+ of the users in...
i18n was the missing piece_ make your apps accessible to 70%+ of the users in...i18n was the missing piece_ make your apps accessible to 70%+ of the users in...
i18n was the missing piece_ make your apps accessible to 70%+ of the users in...Arisa Fukuzaki
 

Similaire à MessageFormat: The future of i18n on the web (19)

Actor Model and C++: what, why and how? (March 2020 Edition)
Actor Model and C++: what, why and how? (March 2020 Edition)Actor Model and C++: what, why and how? (March 2020 Edition)
Actor Model and C++: what, why and how? (March 2020 Edition)
 
Lilypad @ Labweek, Istanbul, 2023.pdf
Lilypad @ Labweek, Istanbul, 2023.pdfLilypad @ Labweek, Istanbul, 2023.pdf
Lilypad @ Labweek, Istanbul, 2023.pdf
 
GurgaonPoliceSummerCyberSecurityInternship
GurgaonPoliceSummerCyberSecurityInternshipGurgaonPoliceSummerCyberSecurityInternship
GurgaonPoliceSummerCyberSecurityInternship
 
You got database in my cloud!
You got database  in my cloud!You got database  in my cloud!
You got database in my cloud!
 
C Interview Basic Q&A- 1
C Interview Basic Q&A- 1C Interview Basic Q&A- 1
C Interview Basic Q&A- 1
 
[CIbSE2023] Cross-language clone detection for Mobile Apps
[CIbSE2023] Cross-language clone detection for Mobile Apps[CIbSE2023] Cross-language clone detection for Mobile Apps
[CIbSE2023] Cross-language clone detection for Mobile Apps
 
Sse Vw Pestel Group8
Sse Vw Pestel Group8Sse Vw Pestel Group8
Sse Vw Pestel Group8
 
Deep Learning to Text
Deep Learning to TextDeep Learning to Text
Deep Learning to Text
 
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
 
Internationlization
InternationlizationInternationlization
Internationlization
 
Why the embedded world needs open source communities
Why the embedded world needs open source communitiesWhy the embedded world needs open source communities
Why the embedded world needs open source communities
 
Actor Model and C++: what, why and how?
Actor Model and C++: what, why and how?Actor Model and C++: what, why and how?
Actor Model and C++: what, why and how?
 
Developing Your Own Flux Packages by David McKay | Head of Developer Relation...
Developing Your Own Flux Packages by David McKay | Head of Developer Relation...Developing Your Own Flux Packages by David McKay | Head of Developer Relation...
Developing Your Own Flux Packages by David McKay | Head of Developer Relation...
 
Embedded Linux dev
Embedded Linux devEmbedded Linux dev
Embedded Linux dev
 
Virtual enterprise synthesys
 Virtual enterprise synthesys Virtual enterprise synthesys
Virtual enterprise synthesys
 
Fast and Accurate Entity Linking via Graph Embedding
Fast and Accurate Entity Linking via Graph EmbeddingFast and Accurate Entity Linking via Graph Embedding
Fast and Accurate Entity Linking via Graph Embedding
 
i18n was the missing piece_ make your apps accessible to 70%+ of the users in...
i18n was the missing piece_ make your apps accessible to 70%+ of the users in...i18n was the missing piece_ make your apps accessible to 70%+ of the users in...
i18n was the missing piece_ make your apps accessible to 70%+ of the users in...
 
What is Python?
What is Python?What is Python?
What is Python?
 
Consuming GraphQL APIs in C#.pptx
Consuming GraphQL APIs in C#.pptxConsuming GraphQL APIs in C#.pptx
Consuming GraphQL APIs in C#.pptx
 

Plus de Igalia

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEIgalia
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesIgalia
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceIgalia
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfIgalia
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JITIgalia
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!Igalia
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerIgalia
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in MesaIgalia
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIgalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera LinuxIgalia
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVMIgalia
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsIgalia
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesIgalia
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSIgalia
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersIgalia
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...Igalia
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on RaspberryIgalia
 
Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...Igalia
 

Plus de Igalia (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPE
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded Devices
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to Maintenance
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdf
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JIT
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamer
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera Linux
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVM
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devices
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shaders
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on Raspberry
 
Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...
 

Dernier

FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka DoktorováCzechDreamin
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsUXDXConf
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekCzechDreamin
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024TopCSSGallery
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreelreely ones
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 

Dernier (20)

FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 

MessageFormat: The future of i18n on the web

  • 1. MessageFormat The future of i18n on the web Ujjwal Sharma (@ryzokuken) FOSDEM 2024, Brussels 󰎐
  • 2. Bienvenue! Welkom! Willkommen! i18n.t(‘welcome’) MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024
  • 3. About Me MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 Ujjwal Sharma (ryzokuken) from New Delhi, India based out of A Coruña, Galiza OSS zealot, open web maximalist love dogs, (masochistic) videogames work at Igalia
  • 4. About Igalia MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 An open-source consultancy A worker-owned cooperative Extensive work across major open source projects and ecosystems Linux kernel, userspace and multimedia Major contributor in the web platform and browser projects Compilers (JS engines, LLVM) and PL design (WASM, JS)
  • 5.
  • 6.
  • 7. A (now) general purpose programming language designed primarily for scripting web interfaces. MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024
  • 8.
  • 9. Stage One: Initially, the sign (image or representation) is a reflection of basic reality.
  • 10. Stage Two: The sign masks a basic reality. The image becomes a distortion of reality.
  • 11. Stage Three: The sign marks the absence of basic reality. The image calls into question what the reality is and if it even exists.
  • 12. Stage Four: The sign bears no relation to any reality whatsoever; it is its own pure simulacrum.
  • 13. What is the “web” platform? MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 An interactive, decentralized communication platform at the scale of the entire human civilization. A standard platform for widely accessible and rich user interfaces. The ambition of universality is inherently built into it and like all platforms for UIs, it’s required to be accessible and localizable.
  • 14. Quick note Internationalization (aka i18n) is the practice of designing a system in such a way that it can easily be adapted for different target audiences, that may vary in region, language, or culture. The complementary process of adapting a system for a specific target audience is called Localization (aka l10n). MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024
  • 15. Early attempts at i18n MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 UIs are composed of string content, called “Messages”. Manual localization was attempted but quickly proved unmanageable. The actual diversity of locales could never be catered to. To promote a better and cleaner approach, C developers hacked up gettext in 1988.
  • 16. Let’s talk about gettext MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 gettext was one of the two i18n systems in glibc (the other being catgets). Despite not being standardized, its adoption by Sun and GNU made gettext a hit. Mainly dealt with static string replacement, but also provided basic plural selection. Went on to inspire i18n tooling in all relevant areas: ● Python’s gettext ● Java’s MessageFormat (starting in 1996 at Sun) ● ICU MessageFormat (plurals, selection and nesting)
  • 17. MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 "There {0,n,0#are no files|1#is one file|1<are {0,number,integer} files}." There are no files. There is one file. There are 1337 files.
  • 18. ICU MessageFormat MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 Rethink the fundamentals, including taking inspiration from catgets. Designed with feedback from implementers and translators at the forefront. Greatly expanded abilities, format complexity, opening up an entirely new space for innovation. ICU MessageFormat (plural and select) Java MessageFormat (pattern strings, format basic types, choice format)
  • 19. MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 "{pronouns_of_host, select, " "feminine {" "{num_guests, plural, offset:1 " "=0 {{host} does not give a party.}" "=1 {{host} invites {guest} to her party.}" "=2 {{host} invites {guest} and one other person to her party.}" "other {{host} invites {guest} and # other people to her party.}}}" "masculine {" "{num_guests, plural, offset:1 " "=0 {{host} does not give a party.}" "=1 {{host} invites {guest} to his party.}" "=2 {{host} invites {guest} and one other person to his party.}" "other {{host} invites {guest} and # other people to his party.}}}" "other {" "{num_guests, plural, offset:1 " "=0 {{host} does not give a party.}" "=1 {{host} invites {guest} to their party.}" "=2 {{host} invites {guest} and one other person to their party.}" "other {{host} invites {guest} and # other people to their party.}}}}"
  • 20. The good ‘ol web MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 The early days of the web were dominated by documents or very static CRUD apps. Early websites relied almost entirely on server runtimes for their content. Via Java’s java.text, PHP’s Intl and RoR’s i18n, web developers started tinkering with message formatting, ICU enabled the rest. With a combination of message formatting, templating languages and HTTP content negotiation, we reach the first important milestone for i18n on the web.
  • 21. Them pesky JS developers MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 Due to various reasons, JS remained largely unpopular for almost an entire decade. jQuery was released in 2006, sparking a whole new era of experimentation. Fast forward 10 years and we live in an era of SPAs and dynamic web experiences. TC39 formulated TC39-TG2 to add Internationalization features to JavaScript. Modern JS interfaces utilize these features to format and display info on the fly.
  • 22. The state of i18n on the web MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 Outside JS’s Intl, important work includes supporting more writing systems and keyboard layouts. Intl has gradually grown to provide most of the building blocks we need ● Formatters (Numbers, Date/time, Lists, Durations, …) ● Collator ● Segmenter ● Plural and ordinal selection There’s one big missing piece…
  • 23. Timeline of MessageFormat 2 MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 2020-01 WG reorganized under Unicode CLDR-TC 2019-07 MF WG first organized under TC39-TG2 2016-07 Discussion under tc39/ecma402#92 2013-04 Initial strawperson proposed and discussed
  • 24. "{pronouns_of_host, select, " "feminine {" "{num_guests, plural, offset:1 " "=0 {{host} does not give a party.}" "=1 {{host} invites {guest} to her party.}" "=2 {{host} invites {guest} and one other person to her party.}" "other {{host} invites {guest} and # other people to her party.}}}" "masculine {" "{num_guests, plural, offset:1 " "=0 {{host} does not give a party.}" "=1 {{host} invites {guest} to his party.}" "=2 {{host} invites {guest} and one other person to his party.}" "other {{host} invites {guest} and # other people to his party.}}}" "other {" "{num_guests, plural, offset:1 " "=0 {{host} does not give a party.}" "=1 {{host} invites {guest} to their party.}" "=2 {{host} invites {guest} and one other person to their party.}" "other {{host} invites {guest} and # other people to their party.}}}}" MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 Me: Mom, can we have MessageFormat? Mom: No, we have MessageFormat in ICU. MessageFormat in ICU:
  • 25. The need for a new MessageFormat MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 It’s based on an old design which can’t adapt to modern tools and interactions, like dynamic UI frameworks. Lack of modularity and extensibility. Can’t deprecate anything, stuck with legacy features. Diversity of locales makes it impossible to map core l10n structures 1:1. Plaintext, imperative API style makes it quite limited. Need to subsume functionality from non-standard (proprietary) tooling.
  • 26. A quick and clumsy intro MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 A dynamic message string is a string whose content changes due to the value of or insertion of some data value or values. MF2 intends to excel at complex use cases while keeping the basics simple. ● Text mode first ● Complex messages and expressions ● Declarations and annotations (functions, private use) ● Function registry and builtins
  • 27. Simple and Complex messages MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 This is a message. Hello, {$userName}! .match {$userType :equals} registered {{Welcome {$username}!}} guest {{Welcome Guest!}} * {{Welcome!}} SIMPLE EXPRESSION COMPLEX
  • 28. How expressive can they be MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 The match on {$date :datetime dateStyle=long} is cancelled. Check out {#img src=|image.png|/}. .input {$date :datetime weekday=long month=medium day=short} .local $numPigs = {$pigs :integer} {{On {$date} you had this many pigs: {$numPigs}}} FUNCTIONS MARKUP DECLARATIONS
  • 29. Wait, there’s more? MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 An extensible function registry. Popular built-in formatters and selectors ● Date/time, durations? ● Numbers, integers ● Plural and ordinal selection ● Lists
  • 30.
  • 31. "{pronouns_of_host, select, " "feminine {" "{num_guests, plural, offset:1 " "=0 {{host} does not give a party.}" "=1 {{host} invites {guest} to her party.}" "=2 {{host} invites {guest} and one other person to her party.}" "other {{host} invites {guest} and # other people to her party.}}}" "masculine {" "{num_guests, plural, offset:1 " "=0 {{host} does not give a party.}" "=1 {{host} invites {guest} to his party.}" "=2 {{host} invites {guest} and one other person to his party.}" "other {{host} invites {guest} and # other people to his party.}}}" "other {" "{num_guests, plural, offset:1 " "=0 {{host} does not give a party.}" "=1 {{host} invites {guest} to their party.}" "=2 {{host} invites {guest} and one other person to their party.}" "other {{host} invites {guest} and # other people to their party.}}}}" MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 Remember this?
  • 32. MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 .match {$guestCount :number offset=1} {$hostPronouns :equals} 0 * {{{$host} does not give a party.}} 1 feminine {{{$host} invites {$guest} to her party.}} 1 masculine {{{$host} invites {$guest} to his party.}} 1 * {{{$host} invites {$guest} to their party.}} 2 feminine {{{$host} invites {$guest} and one other to her party.}} 2 masculine {{{$host} invites {$guest} and one other to his party.}} 2 * {{{$host} invites {$guest} and one other their party.}} * feminine {{{$host} invites {$guest} and # others to her party.}} * masculine {{{$host} invites {$guest} and # others to his party.}} * * {{{$host} invites {$guest} and # others their party.}}
  • 33. Why does any of this matter MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 i 1 8 n , M F UI design W eb Platform Intl.MF, MF2 J a v a S c r i p t
  • 34. Intl’s MessageFormat MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 We finally brought Intl.MessageFormat back to committee! Accepted to Stage 1 in March 2022 (and hopefully Stage 2 soon). Built on top of familiar Intl design patterns and plans to integrate formatters. const mf = new Intl.MessageFormat('Hello!', 'es'); mf.format(); // 'Hola!'
  • 35. Challenges MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 Obviously we’re not done yet, delays, indecision. The plethora of stakeholders and requirements could overcomplicate design. Lack of user attention and feedback. Lack of stability and direction. Difficult to have your cake and eat it too, but we try.
  • 36. Get involved MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024 Standard, format and data model: https://github.com/unicode-org/message-format-wg/ JavaScript proposal: https://github.com/tc39/proposal-intl-messageformat Find us on GitHub and Matrix!
  • 37. Merci! Bedankt! Danke schön! i18n.t(‘thanks’) MessageFormat: The future of i18n on the web Ujjwal Sharma (@ryzokuken), FOSDEM 2024