-
Notifications
You must be signed in to change notification settings - Fork 194
Internationalization i18n (Developer Guide)
Alby is a general browser extension to bring the Bitcoin Lightning network to the browser. Alby extension provides deep Lightning Network integration for websites (for payments and authentication flows) and allows browsers to interact with the Lightning Network programmatically. The Alby extension implements the WebLN standard as the interface that allows websites to connect to Lightning Network nodes (to request payments, invoices, signatures, login, etc.) and enable seamless UX of web payments and authentications.
Internationalization, also abbreviated as I18n, is a process of abstracting the strings out of the application in form of keyed dictionaries (we use .json
file format) and having their translations in the desired language so that the platform can be represented in multiple languages.
The internationalization and localization of Alby aim at creating a flexible I18n infrastructure in such a way that creating, editing, modifying, and managing translations in Alby can be done an easier way.
Alby uses Weblate to manage translations for different locales. If you'd like to contribute, you can add translations here.
We use the react-i18next library which is shipped with different helper plugins. It is an easy to use and extensible library for translating React-based platforms into multiple languages.
Along with this, we use the integration of a browser language detector plugin for automated language detection, locale load and locale store throughout the different sessions.
All the translations are placed in src/i18n/locales/{locale}/
, where {locale}
is the locale name representation of the language (e.g. en/
for English, hi/
for Hindi). Each {locale}
folder contains two files:
-
translation.json
: Strings that should be treated as unique to where they are used (even if it happens to be a duplicate) -
common.json
: Repeated strings used frequently throughout the app
Locale names are standard acronyms defined for each language according to the ISO 639-1 standards. You can visit a curated list of locales along with their language names, Here
- Home
- Bounties
- Calls
- Connector API
- Internationalization i18n (Developer Guide)
- Lightning Monetization meta tag
- Lightning Node Connect
- Making Payment Transactions Smart With Structured Metadata
- Open Design
- Test Setup
- Image Compression Tutorial