CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
cdc::ui::OverlayLanguage Struct Reference

Internationalization singleton. More...

#include <I18n.h>

Public Attributes

std::string code
 Language code, e.g. "de" (lower-case).
std::string name
 Endonym for the picker (CP437-encoded), e.g. "Deutsch".

Detailed Description

Internationalization singleton.

Lookup order for tr(key):

  1. If current language is "en" or no overlay loaded: return English fallback.
  2. If overlay has a translation for the current language and key: return it.
  3. Else: fall back to English. Returns "?<key>" if even English is missing.

Thread safety: registration is expected to happen single-threaded during module init. tr() is read-only after all modules have registered. One selectable overlay language: ISO code plus its own display name.

Definition at line 61 of file I18n.h.

Member Data Documentation

◆ code

std::string cdc::ui::OverlayLanguage::code

Language code, e.g. "de" (lower-case).

Definition at line 62 of file I18n.h.

◆ name

std::string cdc::ui::OverlayLanguage::name

Endonym for the picker (CP437-encoded), e.g. "Deutsch".

Definition at line 63 of file I18n.h.


The documentation for this struct was generated from the following file:
  • components/cdc_ui/include/cdc_ui/I18n.h