Files
system-design-101/data/guides/how-do-we-design-a-system-for-internationalization.md
Kamran Ahmed ee4b7305a2 Adds ByteByteGo guides and links (#106)
This PR adds all the guides from [Visual
Guides](https://bytebytego.com/guides/) section on bytebytego to the
repository with proper links.

- [x] Markdown files for guides and categories are placed inside
`data/guides` and `data/categories`
- [x] Guide links in readme are auto-generated using
`scripts/readme.ts`. Everytime you run the script `npm run
update-readme`, it reads the categories and guides from the above
mentioned folders, generate production links for guides and categories
and populate the table of content in the readme. This ensures that any
future guides and categories will automatically get added to the readme.
- [x] Sorting inside the readme matches the actual category and guides
sorting on production
2025-03-31 22:16:44 -07:00

51 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "How to Design a System for Internationalization"
description: "Learn how to design a system for internationalization effectively."
image: "https://assets.bytebytego.com/diagrams/0235-internationalization.jpeg"
createdAt: "2024-03-06"
draft: false
categories:
- how-it-works
tags:
- "internationalization"
- "system design"
---
![](https://assets.bytebytego.com/diagrams/0235-internationalization.jpeg)
The diagram below shows how we can internationalize a simple e-commerce website.
Different countries have differing cultures, values, and habits. When we design an application for international markets, we need to localize the application in several ways:
## Language
* Extract and maintain all texts in a separate system. For example:
* We shouldnt put any prompts in the source code.
* We should avoid string concatenation in the code.
* We should remove text from graphics.
* Use complete sentences and avoid dynamic text elements.
* Display business data such as currencies in different languages.
## Layout
* Describe text length and reserve enough space around the text for different languages.
* Plan for line wrap and truncation.
* Keep text labels short on buttons.
* Adjust the display for numerals, dates, timestamps, and addresses.
## Time zone
The time display should be segregated from timestamp storage.
Common practice is to use the UTC (Coordinated Universal Time) timestamp for the database and backend services and to use the local time zone for the frontend display.
## Currency
We need to define the displayed currencies and settlement currency. We also need to design a foreign exchange service for quoting prices.
## Company entity and accounting
Since we need to set up different entities for individual countries, and these entities follow different regulations and accounting standards, the system needs to support multiple bookkeeping methods. Company-level treasury management is often needed. We also need to extract business logic to account for different usage habits in different countries or regions.