🌍 🌏 🌎

What it Means to...

Scale Your Frontend

🌍 🌏 🌎

Kyle West

Staff Engineer, FamilySearch

© 2025 Kyle West

"Scale"

© 2025 Kyle West

© 2025 Kyle West

es zh ja

Localized Strings

it fr pt

© 2025 Kyle West

Setup Translation Resources

public/locales/en/translation.json:

{
  "welcome": "Welcome, {{name}}!",
  "itemCount":
    "{{count, plural, one {# item} other {# items}}}"
}

public/locales/es/translation.json:

{
  "welcome": "¡Bienvenido, {{name}}!",
  "itemCount": 
    "{{count, plural, one {# artículo} other {# artículos}}}"
}
© 2025 Kyle West

Using i18next in React Components

import { useTranslation } from 'react-i18next';

function WelcomeComponent({ userName, itemCount }) {
  const { t } = useTranslation();
  
  return (
    <div>
      <h1>{t('welcome', { name: userName })}</h1>
      <p>{t('itemCount', { count: itemCount })}</p>
    </div>
  );
}

// English: "Welcome, Kyle!" + "5 items"
// Spanish: "¡Bienvenido, Kyle!" + "5 artículos"
© 2025 Kyle West
import i18n from 'i18next';
import ICU from 'i18next-icu';
import LanguageDetector from 'i18next-browser-languagedetector';
import { I18nextProvider } from 'react-i18next';

i18n
  .use(ICU)
  .use(LanguageDetector)
  .init({
    fallbackLng: 'en',
    react: {
      bindI18n: 'languageChanged loaded',
      bindStore: 'added removed',
    }
  });

ReactDOM.render(
  <I18nextProvider i18n={i18n}><App /></I18nextProvider>,
  document.getElementById('app')
);
© 2025 Kyle West
.init({
  fallbackLng: 'en', 
  // ...
});
© 2025 Kyle West
.init({
  fallbackLng: { 
    'default': ['en'],
    'zh-Hant': ['zh-Hans', 'en'], 
    'ua': ['ru'],
    'de-CH': ['fr', 'it'],
    // ...
  }
});
© 2025 Kyle West

© 2025 Kyle West

© 2025 Kyle West

Left to Right

Right to Left

© 2025 Kyle West

© 2025 Kyle West

© 2025 Kyle West

© 2025 Kyle West

© 2025 Kyle West

© 2025 Kyle West
Directional Property Logical Property
margin-right margin-inline-end
margin-left margin-inline-start
padding-right padding-inline-end
padding-left padding-inline-start
text-align: right; text-align: end;
text-align: left; text-align: start;
left inset-inline-start
right inset-inline-end
border-right border-inline-end
border-left border-inline-start
border-top-left-radius border-start-start-radius
border-top-right-radius border-start-end-radius
© 2025 Kyle West

Other Considerations

  • Images
    • Consider swapping out instead of flipping
    • Left vs Right hands
  • Video & Audio Controls
  • Some languages like are "westernizing"
© 2025 Kyle West

🧭 ⬇️ 🧭

The Global South

🧭 ⬇️ 🧭

© 2025 Kyle West

© 2025 Kyle West

Current User Base

  • 💻 Multiple devices, per person
  • 🛜 High-speed "unlimited" connection
  • 👩‍💻 Motivated by productivity
  • ⌨️ High Technical Literacy
© 2025 Kyle West

Emerging Users

  • 📱 Mobile phone only, often shared
  • 📶 Severely limited infrastructure
  • 🎥 Motivated by leisure
  • ☎️ Low Technical Literacy
© 2025 Kyle West

📱 Only Mobile Phones

  • "Outdated" devices, 5-10 years old
  • No access to desktop, laptop, tablet
  • Single device often shared within a household (competition for screen-time)
© 2025 Kyle West

📱 We Need to Change Our Culture

  • Stop assuming the consumer:
    • has a "large screen" they can fallback to at will
    • has unlimited time to perform tasks
  • We must be relentlessly mobile-first:
    • Discovery done via mobile
    • Design all experiences for mobile
    • Build & test products on limited CPU/memory/storage devices
    • Sell-off experiences on mobile
© 2025 Kyle West

📶 Severely Limited Infrastructure

  • No data, or $$$ data plans
  • Unlikely to have internet at home
  • Internet access often provided in distracting environments (convenience stores, bus rides, etc)
© 2025 Kyle West

📶 We Need to Change
Our Infrastructure

  • Be more deliberate with over-the-wire transactions
    • Monitor & reduce payload sizes
    • Allow users to be in control when actions could (literally) cost them
  • Design & build products to work offline
    • Critical user flows should work with intermittent or offline internet
    • Need patterns to manage conflicts once online
© 2025 Kyle West

🎥 Motivated by Leisure,
Rather than Productivity

  • Limited data and time forces users to choose where to focus their efforts
  • Many are drawn to entertainment values
    • Media, games, etc provide instant pleasure
    • "Work related" tasks don't always yield financial results
    • Most conclude the best "bang for your buck" is found in entertainment
© 2025 Kyle West

🎥 Do we have to offer Leisure?

  • No, but we must offer something that connects users to a core need
    • Human Connection
    • Infrastructure (Transportation, Food, etc)
    • ?
  • We need to provide clear ROI to convert users
© 2025 Kyle West

☎️ Low Technical Literacy

  • Users won't intuit your UI like you plan
© 2025 Kyle West

☎️ We must have simpler designs

  • Clearer calls to action
  • Resumability of tasks
  • Borrow design patterns from OS
© 2025 Kyle West

Inclusive Solutions Require
🌏 Innovative Change 🌍

© 2025 Kyle West
  • Accessibility (you can look up my React Summit 2025 talk for that)
  • Progressive Web Apps
  • Top-down/bottom-up languages
  • Localizing Dates (the Rumi Calendar will kick your butt)
  • Political Issues (Russia and North Korea)
  • Bundle Optimization
  • Unicode E-F & Font Subsetting
© 2025 Kyle West

Questions?

© 2025 Kyle West

"Human beings are far more wonderful than machines"

— Fred McFeely Rogers

© 2025 Kyle West

Thank you!

Kyle West

@KyleWestCS

Slides on my website:

kylewest.dev/slides

© 2025 Kyle West

Hello everyone! My name is Kyle West, I'm a Staff Engineer at FamilySearch. Full disclosure, this talk arose from an argument I had at lunch with a friend. He's a backend engineer, and one day he said something to the effect of: > Well as a UI guy, you don't have to think about things like _scaling_. That might be nice. My friend is a smart guy, but I know that this comment came from decades of backend engineers hating on the frontend. There's a common misconception that "making things look pretty" isn't as complex as the problems backend folk like to solve, but it's entirely false. Frontend folk solve just as complex of problems, if not more so—because UX is full of unsolved problems.

Today I just want to tackle one angle of those kinds of problems: Scaling your application. But what do I mean by "scale". When you hear this word, you might think of: - Load balancing - CDNs - Orchestration Layers - Microservices And this is indeed what the industry tends to think of in terms of scale. But they all follow under the umbrella of "performance" Performance is important to the success of a product. But there is _so much_ more that goes into building a scalable product.

What I am talking about, is a topic with many names. You've probably heard of some or all of these terms, and there's a lot of nuance between each of them, but all of these concepts solve the same general problem: > How do I build something that anyone can use? That's what I want to talk about today. You'll hear me use the term "globalization" to refer to this concept, but just know there are many parts to it.

The first and most obvious problem you'll come across is that not all users around the world speak your language. You'll need to implement a system that lets you swap out the strings in your UI to something the user can read. This use to be a hard problem, but today it's more or less solved.

Now you can just create a JSON file to hold your string values. Notice here that I am using something called the ICU Message Format. It's a little hard to read at first, but it allows us to write some complex interpolation rules. Modern libraries tend to support ICU format.

Here is an example using react-i18next. If you app doesn't support localized strings, you can see that this is fairly trivial to add with modern tools.

In fact, it's less than 20 lines of code to get you started. Normally I wouldn't even show you the config because I basically copied it from the react-i18next getting started page, but there's something here that I want to point out.

Where people tend to under optimize, is with choosing an appropriate fallback language. The cheapest option, is just fallback to whatever language the product was originally written in. And that works. It more or less guarantees that a string will show up in any given context. But this is not always the best.

Consider this instead. Your users might prefer something other than your default. Now they can always indicate this with the Browser Settings, but not all will. See here that you can set a list of fallbacks for each locale to be smarter about what is shown when a language is missing for a feature. You might ask, "Why isn't this list standard." That's because it should be a function of what languages you support on your site.

And that's often good enough for a large portion of the world. But if your product keeps growing, one day you will discover that just adding strings isn't enough for a global user base.

There's a significant portion of the world (about 11% of the total population) that requires a significant change to your UI to support.

I'm talking about supporting Right-to-Left languages. like: Arabic, Hebrew, Farsi, etc.

One thing that's drastically different from right to left languages, is that their UI...

...should be the mirror opposite of Left to Right layouts. Why is that?

It's because all that work we did during the design phase to get proper balance, grouping, whitespace, etc would be ruined if all we did was have the text right-justified.

See here how the balance changes as we shift the design around towards mirroring. Notice how the second panel feels off ballance. The text feels disconnected from the Avatar and the controls feel over emphasized. Look at the third panel. See how mirroring the UI restores the balance to what the first panel has. We need that for when we render RTL UIs.

Good news is that the browser does half of the heavy lifting for you. Things like Flex and Grid layouts will automatically render their children in reverse order. We just need to finesse a few things ourselves to get things looking good.

The hardest shift is that you need to stop thinking in directional CSS and shift to using logical positioning. Keep in mind that these are just a few of them I felt like calling out. There are plenty more. You can find all of these on MDN if you want to look more into this later.

Confession, this is where I stop being an expert and have become a student. I've been studying this topic a lot recently, but the more I learn, the more I realize that I don't know nearly as much as I want to. I'd like to share with you what I am learning though, if that's ok.

If you take a look at our map from earlier, notice the places we still haven't been able to adequately serve. Unlike the ones we've been working with before. These users have drastically different needs than anything else we've encountered.

For one, they aren't always online like the others. Not everyone in the world has reliable or strong internet.

Further, may of these people suffer from extreme poverty.

These and other factors have several implications on how our users will approach our products. As a comparison, lets take a look at our "average" user we currently serve.

We can't just shoehorn our old solutions (with their accompanying assumptions) into people's lives. We need to adapt our understandings and work culture to meet people where they are at.

I'd like to leave you with one of my favorite quotes from Mr Rogers. After this presentation, you might be feeling a little overwhelmed by all the complexity that needs to be maintained to have a global product. When I feel overwhelmed, I think about all the amazing people I've met from all over the world. Everyone is unique, and that means our needs are all unique. But this diversity is what makes life beautiful.

I'm Kyle West. You can find me on BlueSky or LinkedIn under @KyleWestCS. You can find my slides on my website at kylewest.dev/slides It's been a pleasure, Thank so much you! ---------