rlf-localization

Define, translate, and validate RLF strings using the rlf! macro.

Updated Jan 4, 2025
One-click install
npx skills add https://github.com/dreamtides/dreamtides --skill rlf-localization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rlf-localization
Source: https://github.com/dreamtides/dreamtides/tree/main/.llms/skills/rlf-localization
Command: npx skills add https://github.com/dreamtides/dreamtides --skill rlf-localization

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of managing localized text strings within the RLF (Rust Localization Framework), ensuring consistent and accurate translations across different languages.

Core Features & Use Cases

  • String Definition: Define and manage English phrases and their localized variants using the rlf! macro.
  • Translation Management: Load, switch, and validate translations for various locales.
  • Use Case: When adding new game terms or updating existing phrases, use this Skill to ensure they are correctly defined in strings.rs and properly translated in the corresponding .rlf files.

Quick Start

Use the rlf-localization skill to add a new phrase 'welcome_message' to the RLF system.

Frequently Asked Questions about rlf-localization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Rust localization strings for multiple locales?

Rust localization strings are managed by defining phrases with the rlf! macro at compile time and loading corresponding .rlf translation files at runtime to ensure accurate multi-language support.

How does compile-time phrase definition work in the Rust Localization Framework?

Compile-time phrase definition uses the rlf! macro to declare English phrases in strings.rs, which are then mapped to translated variants stored in .rlf files for runtime locale loading.

What's the best way to add a new translated phrase to an RLF project?

To add a translated phrase, define the new English string in strings.rs using the rlf! macro, then add the corresponding localized variants in the related .rlf files for each target locale.

Can I switch and validate translations dynamically at runtime with RLF?

Yes, the Rust Localization Framework supports runtime locale loading, allowing applications to dynamically switch active locales and validate that translated text is correctly loaded.

Does RLF require any external dependencies for internationalization?

No, RLF operates without external dependencies, managing internationalization entirely through its built-in compile-time macro and runtime locale loading mechanisms.

Why are my Rust localization strings not loading correctly at runtime?

Runtime loading fails when phrases defined via the rlf! macro in strings.rs do not match the localized variants in the corresponding .rlf files, causing validation errors during locale switching.