add support for supplying ltr and rtl

This commit is contained in:
Jacob Overgaard
2023-08-01 10:42:56 +02:00
parent 95a57c249c
commit 13c6a29ce3
2 changed files with 8 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ export class UmbTranslationRegistry {
// Notify subscribers that the inner dictionary has changed.
const translation: Translation = {
$code: userCulture,
$dir: 'ltr',
$dir: extension.meta.direction ?? 'ltr',
...innerDictionary,
};
registerTranslation(translation);

View File

@@ -12,6 +12,13 @@ export interface MetaTranslations {
*/
culture: string;
/**
* The direction of the translations (left-to-right or right-to-left).
* @example "ltr"
* @default "ltr"
*/
direction?: 'ltr' | 'rtl';
/**
* The translations.
* @example