Skip to content

receiptI18n: Add RTL language support flag and direction helpers #706

Description

@Kingsman-99

Description

receiptI18n provides localised strings for payment receipts but does not indicate whether the active locale uses right-to-left text direction. Contributors should add an isRtl(locale: string): boolean helper and a per-locale rtl: boolean metadata field so receipt rendering code can apply dir="rtl" and mirror layout accordingly.

Acceptance Criteria

  • An isRtl(locale: string): boolean function is exported that returns true for RTL locales (ar, he, fa, ur at minimum)
  • Each locale entry in the translation map includes an rtl: boolean metadata field
  • A getReceiptDirection(locale: string): "ltr" | "rtl" convenience function is also exported
  • Existing tests continue to pass

Context

  • Target file: src/lib/receiptI18n.ts
  • i18n types: src/lib/i18nTypes.ts

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions