Expand description
poly_l10n: Handle locali(s|z)ations the correct way
§Intentions
See https://blog.fyralabs.com/advice-on-internationalization/#language-fallbacks.
In short, this crate handles language fallbacks and detect system languages the correct way.
Get started by LocaleFallbackSolver, system_want_langids() and langid!.
§📃 License
GPL-3.0-or-later
Copyright (C) 2025 madonuko mado@fyralabs.com madonuko@outlook.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Re-exports§
pub use getlang::system_want_langids;pub use unic_langid;
Modules§
- getlang
- Get started by
system_want_langids(). - macros
- per_
lang_ default_ rules - Module for handling fallback rules for specific languages.
Macros§
- langid
- Create a
unic_langid::LanguageIdentifierfrom the given string.
Structs§
- ARulebook
- A set of rules that govern how
LocaleFallbackSolvershould handle fallbacks. - Language
Identifier LanguageIdentifieris a core struct representing a Unicode Language Identifier.- Locale
Fallback Solver - Entry point of
poly_l10n. - Rulebook
- A set of rules that govern how
LocaleFallbackSolvershould handle fallbacks.
Traits§
- Poly
L10n Rulebook - Rulebook trait.