Let’s Remix to Localize Content!

Rate this content
Bookmark

Have you ever wished to have a flexible approach to localize your content to scale easily? Join my talk, and I'll show you multiple strategies to translate and localize your content with Remix. I'll share with you flexible dynamic route options from Remix to generate localized content in a practical way, including a headless approach demo and how to scale your solution in the future. Let's "Remix" to localize your content!

This talk has been presented at Remix Conf Europe 2022, check out the latest edition of this Tech Conference.

FAQ

Eryssa's talk focuses on the impact of internationalization, the fundamental logic behind it, and how it integrates with Remix, a modern web development framework.

Internationalization is often seen as challenging because it can be tedious and is not implemented on a day-to-day basis, requiring developers to frequently revisit and relearn its methodologies and tools.

According to Eryssa's presentation, 25.9% of the internet's content is in English.

The three main methods are using location from the IP address, using the 'Accept-Language' header from HTTP requests or browser settings, and using language identifiers in the URL.

Remixi18next is an npm package specifically designed to integrate the i18next internationalization framework with Remix, enhancing the support for multiple languages in web applications developed with Remix.

Eryssa discusses three URL strategies for international content: using different domains for each language (which can be seen as separate sites), using URL parameters (not user-friendly and looks messy), and using subdirectories (clear and convenient for users and developers).

Combining internationalization with Remix allows developers to create more user-friendly and accessible applications that cater to a global audience, enhancing user experience by providing content in multiple languages.

Arisa Fukuzaki
Arisa Fukuzaki
36 min
18 Nov, 2022

Comments

Sign in or register to post your comment.

Video Summary and Transcription

This Talk introduces Remix and internationalization, highlighting the impact and importance of internationalization in software development. It explores different approaches to internationalizing URLs and the use of Remixi18next for internationalization in Remix. The Talk covers the creation and configuration of translated files, as well as the importance of loading translation files before hydration for improved performance. It discusses the challenges and benefits of localization, including the use of folder-level translation and dynamic routes. The Talk also touches on different translation approaches and the importance of considering user experience and understanding in different languages.

1. Introduction to Remix and Internationalization

Short description:

Hi, everyone. I'm excited to talk about Remix and internationalization. There are three takeaways from my talk: the impact of internationalization, the fundamental logic, and how Remix and internationalization work together. Before we dive in, I want you to know that there are active discussions happening about Remix and internationalization. You can contribute to improving the DX. I'll share the slides and links on Twitter. Now, let's talk about internationalization with Remix. I asked developers on Twitter about their thoughts on implementing internationalization logic. 41.7% of the 36 developers said it's not their favorite and can be annoying. I wanted to know more, so my friend Maya explained that implementing internationalization features is not a day-to-day task for her. There can be issues with localized text and internationalization keys. Internationalization may not be a hot topic for developers, but it's important to consider its impact on the world and the user's perspective.

Hi, everyone. I hope you're doing well, and I'm very excited to see you all, as well as I'm very excited to talk about Remix and internationalization. Well, not to waste any more time, here's little things about me. My name is Eryssa and I'm an engineer as well as an ambassador at girl code and Google Developer Expert in web technologies.

Well, there are three takeaways from my talk. First of all, we are going to take a look at the impact of the internationalization, as well as the fundamental logic, and lastly, we are going to see how Remix and internationalization together.

There are a few notes that I want you to keep in your mind before you watch my talk. First of all, there are still active discussions going on about Remix and internationalization. It means that you could be one of the persons to contribute to improve the DX. So, yeah, feel free to take a look at the discussions, or even join the discussions. I'm going to share with you the slides later on, after my talk on Twitter, so you will get access to all the links that I, yeah, pasted in these slides. All right. So, let's get to the point. We are here to talk about internationalization, and how it works with Remix.

So, while I was preparing my talk, I wanted to include as many as opinions from the developers out there, not just from my side. So, I started to ask this question on Twitter. So, do you like to implement internationalization logic? And this is the result I got. So, first of all, I got the result from 36 developers, and they say about 41.7% of the developers, they say like, it's not my favorite. It's kind of an annoying process to do that. And based on this fact, I also wanted to know, okay, I want to know more about the details, but probably from what I see, this quick poll question on Twitter, maybe for us developers, it is not a prioritized hot topic compared to performance and accessibility. But of course, I want to know more. Why? So, I asked. If the internationalization is not your favorite part, why is it like this? So, here's my friend, Maya, responded me. Thanks, and first of all, she says like, well, it's not like she implements internationalization feature like on to day-to-day basis, means that when she needs to do that, she needs to take a look at again how it works from the internationalization libraries or the frameworks she uses every time. Also, there is a little bit of issue between localized text and internationalization keys, you know, like during the test. So we know that, okay, probably like internationalization is not the hottest topic, and that's not something like fun part for developers. And based on what we think, of course, we also need to take a look at or see like how is it like in the world and how is it like for the user's perspective as well. So here's the little numbers and effects. I'd like to start from something bigger numbers. So first of all, I want you to think about this number.

2. Introduction to Internationalization Logic

Short description:

What do you think this 5.07 billion number stands for? It is actually the numbers of the users in the world who use the internet. So breaking down, you know like these big billions of numbers into smaller percentages, starting from 25.9 percent. What do you think about this percentage? This is actually the percentage of the English content on the internet. 25.9 is less than 50 percent, which means that if you're good at math, then you could probably like calculate this number. China has the most internet users worldwide. Asia needs more than half of global internet users. Let's talk about the fundamental logic of internationalization. Internationalization works in three ways to determine the languages and the regions. The first approach is location from the IP address, the second is using accept language header from the HTTP request or the navigator languages, and the third is using the identifier in URL. We are going to use two ways to go hybrid: allowing users to change languages on the browser and detecting their preferred language setting. There are three patterns to take a look at for the identifier URL, with pattern one being a way to differentiate localized content by domains.

What do you think this 5.07 billion number stands for? It is actually the numbers of the users in the world who use the internet. So breaking down, you know like these big billions of numbers into smaller percentages, starting from 25.9 percent. What do you think about this percentage? This is actually the percentage of the English content on the internet. 25.9 is less than 50 percent, which means that if you're good at math, then you could probably like calculate this number.

74.1 yes, that's the rest of the percentage of the users who access non English content on the internet, which leads us to this keyword, China. So China actually has the most internet users worldwide. No surprise based on this fact. We also could think about this keyword Asia, so yes, Asia needs more than half of global internet users. That's massive, right? So yes, now we know. Probably localizing content is not the hottest topic for us developers. However, we cannot ignore no matter what, you know, like from this more than a half of the users in the world. It's too massive numbers to ignore.

So based on what we know and what we feel, let's talk about the fundamental logic of internationalization. So first of all, internationalization works in three ways to determine the languages and the regions. The first approach, the most top-end here says, location from the IP address means that based on the IP address, for example, where I am based on right now in Germany, the content that I take a look at on the internet will detect I'm based in Germany, so the content would be, you know, displayed in German sometimes, if they take this approach. If they use the second approach, means using accept language header from the HTTP request or the navigator languages, means that they will take a look at my language preference. So, in the browser, I prefer to use the English, so that's what I configure in my setting, and that's what, you know, like, the information is going to be used to, you know, like, return the localized content for me. So, sometimes, even when I'm based in Germany, I see the content in English as I preferred. And the third option is using the identifier in URL. Basically, it's actually, like, translating or localizing the URL for the users. So, it means, like, the easiest example would be, like, I will have the English, German, and Japanese, let's say, like, language, like, selector buttons on the browser, and I can click to select to take a look at the languages. In this talk, we are going to use two ways to go hybrid because I want our users to be more flexible and to have more control by themselves. So, I would leave the, you know, option for them to change the languages of their choice on the browser from the UI as well as, first of all, like, let's be nicer, detecting their preferred language setting on the browser. So, we saw together, like, how it works or what's the fundamental logic in the internationalization. As for the identifier URL, there are three patterns to take a look at it. So, let's break it down. So, pattern one. So, this is a way to differentiate, you know, like, the localized content by domains. Basically, you're going to create a totally different kind of website, in this case. But the domains are different.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Building Better Websites with Remix
React Summit Remote Edition 2021React Summit Remote Edition 2021
33 min
Building Better Websites with Remix
Top Content
Remix is a web framework built on React Router that focuses on web fundamentals, accessibility, performance, and flexibility. It delivers real HTML and SEO benefits, and allows for automatic updating of meta tags and styles. It provides features like login functionality, session management, and error handling. Remix is a server-rendered framework that can enhance sites with JavaScript but doesn't require it for basic functionality. It aims to create quality HTML-driven documents and is flexible for use with different web technologies and stacks.
Don't Solve Problems, Eliminate Them
React Advanced Conference 2021React Advanced Conference 2021
39 min
Don't Solve Problems, Eliminate Them
Top Content
Kent C. Dodds discusses the concept of problem elimination rather than just problem-solving. He introduces the idea of a problem tree and the importance of avoiding creating solutions prematurely. Kent uses examples like Tesla's electric engine and Remix framework to illustrate the benefits of problem elimination. He emphasizes the value of trade-offs and taking the easier path, as well as the need to constantly re-evaluate and change approaches to eliminate problems.
Scaling Up with Remix and Micro Frontends
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Scaling Up with Remix and Micro Frontends
Top Content
This talk discusses the usage of Microfrontends in Remix and introduces the Tiny Frontend library. Kazoo, a used car buying platform, follows a domain-driven design approach and encountered issues with granular slicing. Tiny Frontend aims to solve the slicing problem and promotes type safety and compatibility of shared dependencies. The speaker demonstrates how Tiny Frontend works with server-side rendering and how Remix can consume and update components without redeploying the app. The talk also explores the usage of micro frontends and the future support for Webpack Module Federation in Remix.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
RemixConf EU discussed full stack components and their benefits, such as marrying the backend and UI in the same file. The talk demonstrated the implementation of a combo box with search functionality using Remix and the Downshift library. It also highlighted the ease of creating resource routes in Remix and the importance of code organization and maintainability in full stack components. The speaker expressed gratitude towards the audience and discussed the future of Remix, including its acquisition by Shopify and the potential for collaboration with Hydrogen.
Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
Watch video: Debugging JS
Debugging JavaScript is a crucial skill that is often overlooked in the industry. It is important to understand the problem, reproduce the issue, and identify the root cause. Having a variety of debugging tools and techniques, such as console methods and graphical debuggers, is beneficial. Replay is a time-traveling debugger for JavaScript that allows users to record and inspect bugs. It works with Redux, plain React, and even minified code with the help of source maps.
Making JavaScript on WebAssembly Fast
JSNation Live 2021JSNation Live 2021
29 min
Making JavaScript on WebAssembly Fast
Top Content
WebAssembly enables optimizing JavaScript performance for different environments by deploying the JavaScript engine as a portable WebAssembly module. By making JavaScript on WebAssembly fast, instances can be created for each request, reducing latency and security risks. Initialization and runtime phases can be improved with tools like Wiser and snapshotting, resulting in faster startup times. Optimizing JavaScript performance in WebAssembly can be achieved through techniques like ahead-of-time compilation and inline caching. WebAssembly usage is growing outside the web, offering benefits like isolation and portability. Build sizes and snapshotting in WebAssembly depend on the application, and more information can be found on the Mozilla Hacks website and Bike Reliance site.

Workshops on related topic

Remix Fundamentals
React Summit 2022React Summit 2022
136 min
Remix Fundamentals
Top Content
Featured WorkshopFree
Kent C. Dodds
Kent C. Dodds
Building modern web applications is riddled with complexity And that's only if you bother to deal with the problems
Tired of wiring up onSubmit to backend APIs and making sure your client-side cache stays up-to-date? Wouldn't it be cool to be able to use the global nature of CSS to your benefit, rather than find tools or conventions to avoid or work around it? And how would you like nested layouts with intelligent and performance optimized data management that just works™?
Remix solves some of these problems, and completely eliminates the rest. You don't even have to think about server cache management or global CSS namespace clashes. It's not that Remix has APIs to avoid these problems, they simply don't exist when you're using Remix. Oh, and you don't need that huge complex graphql client when you're using Remix. They've got you covered. Ready to build faster apps faster?
At the end of this workshop, you'll know how to:- Create Remix Routes- Style Remix applications- Load data in Remix loaders- Mutate data with forms and actions
Master JavaScript Patterns
JSNation 2024JSNation 2024
145 min
Master JavaScript Patterns
Featured Workshop
Adrian Hajdin
Adrian Hajdin
During this workshop, participants will review the essential JavaScript patterns that every developer should know. Through hands-on exercises, real-world examples, and interactive discussions, attendees will deepen their understanding of best practices for organizing code, solving common challenges, and designing scalable architectures. By the end of the workshop, participants will gain newfound confidence in their ability to write high-quality JavaScript code that stands the test of time.
Points Covered:
1. Introduction to JavaScript Patterns2. Foundational Patterns3. Object Creation Patterns4. Behavioral Patterns5. Architectural Patterns6. Hands-On Exercises and Case Studies
How It Will Help Developers:
- Gain a deep understanding of JavaScript patterns and their applications in real-world scenarios- Learn best practices for organizing code, solving common challenges, and designing scalable architectures- Enhance problem-solving skills and code readability- Improve collaboration and communication within development teams- Accelerate career growth and opportunities for advancement in the software industry
Back to the Roots With Remix
React Summit 2023React Summit 2023
106 min
Back to the Roots With Remix
Featured Workshop
Alex Korzhikov
Pavlik Kiselev
2 authors
The modern web would be different without rich client-side applications supported by powerful frameworks: React, Angular, Vue, Lit, and many others. These frameworks rely on client-side JavaScript, which is their core. However, there are other approaches to rendering. One of them (quite old, by the way) is server-side rendering entirely without JavaScript. Let's find out if this is a good idea and how Remix can help us with it?
Prerequisites- Good understanding of JavaScript or TypeScript- It would help to have experience with React, Redux, Node.js and writing FrontEnd and BackEnd applications- Preinstall Node.js, npm- We prefer to use VSCode, but also cloud IDEs such as codesandbox (other IDEs are also ok)
How to Solve Real-World Problems with Remix
Remix Conf Europe 2022Remix Conf Europe 2022
195 min
How to Solve Real-World Problems with Remix
Featured Workshop
Michael Carter
Michael Carter
- Errors? How to render and log your server and client errorsa - When to return errors vs throwb - Setup logging service like Sentry, LogRocket, and Bugsnag- Forms? How to validate and handle multi-page formsa - Use zod to validate form data in your actionb - Step through multi-page forms without losing data- Stuck? How to patch bugs or missing features in Remix so you can move ona - Use patch-package to quickly fix your Remix installb - Show tool for managing multiple patches and cherry-pick open PRs- Users? How to handle multi-tenant apps with Prismaa - Determine tenant by host or by userb - Multiple database or single database/multiple schemasc - Ensures tenant data always separate from others
Integrating LangChain with JavaScript for Web Developers
React Summit 2024React Summit 2024
92 min
Integrating LangChain with JavaScript for Web Developers
Featured Workshop
Vivek Nayyar
Vivek Nayyar
Dive into the world of AI with our interactive workshop designed specifically for web developers. "Hands-On AI: Integrating LangChain with JavaScript for Web Developers" offers a unique opportunity to bridge the gap between AI and web development. Despite the prominence of Python in AI development, the vast potential of JavaScript remains largely untapped. This workshop aims to change that.Throughout this hands-on session, participants will learn how to leverage LangChain—a tool designed to make large language models more accessible and useful—to build dynamic AI agents directly within JavaScript environments. This approach opens up new possibilities for enhancing web applications with intelligent features, from automated customer support to content generation and beyond.We'll start with the basics of LangChain and AI models, ensuring a solid foundation even for those new to AI. From there, we'll dive into practical exercises that demonstrate how to integrate these technologies into real-world JavaScript projects. Participants will work through examples, facing and overcoming the challenges of making AI work seamlessly on the web.This workshop is more than just a learning experience; it's a chance to be at the forefront of an emerging field. By the end, attendees will not only have gained valuable skills but also created AI-enhanced features they can take back to their projects or workplaces.Whether you're a seasoned web developer curious about AI or looking to expand your skillset into new and exciting areas, "Hands-On AI: Integrating LangChain with JavaScript for Web Developers" is your gateway to the future of web development. Join us to unlock the potential of AI in your web projects, making them smarter, more interactive, and more engaging for users.
Build and Launch a personal blog using Remix and Vercel
Remix Conf Europe 2022Remix Conf Europe 2022
156 min
Build and Launch a personal blog using Remix and Vercel
Featured Workshop
Robert Pop
Robert Pop
In this workshop we will learn how to build a personal blog from scratch using Remix, TailwindCSS. The blog will be hosted on Vercel and all the content will be dynamically served from a separate GitHub repository. We will be using HTTP Caching for the blog posts.
What we want to achieve at the end of the workshop is to have a list of our blog posts displayed on the deployed version of the website, the ability to filter them and to read them individually.
Table of contents: - Setup a Remix Project with a predefined stack- Install additional dependencies- Read content from GiHub- Display Content from GitHub- Parse the content and load it within our app using mdx-bundler- Create separate blog post page to have them displayed standalone- Add filters on the initial list of blog posts