TranslationSet
Class
Translations of one key in several locales.
from discord_interactions.slash import TranslationSetConstructor
TranslationSet( key: str, translations: Dict[str, str] = <factory>, default: str | None = None,)| Name | Type | Default | Description |
|---|---|---|---|
key | str | required | |
translations | Dict[str, str] | <factory> | |
default | str | None | None |
Properties
| Name | Type | Description |
|---|---|---|
key | str | |
translations | Dict[str, str] | |
default | str | None |
Methods
get
def get(locale: str, fallback: str | None = None) -> strGet translation for a locale with fallback.
to_api_dict
def to_api_dict() -> Dict[str, str]Convert to Discord API format.