Crate hydrogen_i18n

source ·
Expand description

§Nashira Deer // Hydrogen I18n

Translation utilities for server-side applications that need to deal with different languages at the same time.

PayPal GitHub Sponsor Crates.io docs.rs

Server-side applications that deal directly with users will need to be prepared to deal with different languages too, so Hydrogen I18n comes with utilities focused on making this task easier, loading and managing all the languages supported by the application in the memory, avoiding unnecessary disk and CPU usage.

Hydrogen I18n is part of Hydrogen Framework, this means that this crate is designed to be used on Discord bots created using serenity and twilight, but is sufficiently generic to be used by any other application that does not use these Discord libraries or even Discord bots.

§Donating

Consider donating to make Hydrogen I18n development possible. You can donate through Nashira Deer’s PayPal or GitHub Sponsor.

§Features

  • serenity: Enables functions that make it easy to use the library in Discord apps and bots built with serenity.
  • tokio: Enables tokio-based async loaders.
  • simd: Use simd-json instead of serde_json.

§Credits

Hydrogen I18n is a Nashira Deer project licensed under the MIT License and licensed under the GNU Lesser General Public License v3 until v1.0.1.

Re-exports§

Structs§

  • Translation manager, used to load and manage all languages in the memory.
  • An iterator over all the translations of a category and key, ignores invalid links or links that points to another link.

Enums§

  • Groups all the errors that can be returned by Hydrogen I18n.
  • A language containing categories as key-value pairs or a link to another language.

Type Aliases§

  • A single category containing translations as key-value pairs.
  • A result with the error type of Hydrogen I18n.