Skip to content

feat(i18n): add Persian/Farsi and Iran support #241

Description

@khaira777

Context

Discussion: https://github.com/orgs/FreeOpenSourcePOS/discussions/239

A community member requested Persian/Farsi support and suggested adding Iran to the country profile. This issue tracks the work without treating a country entry as complete language support.

Goal

Provide a reliable first-class experience for Iranian businesses using Persian (fa-IR) and the Iran (IR) country profile.

Scope

  • Add the Iran country profile with verified locale, currency, timezone, and dialing information.
  • Add Persian/Farsi as a supported UI language.
  • Add a complete Persian translation with the same key coverage as the existing languages.
  • Add RTL document and layout support, including setup, dashboard, POS, KDS, and settings.
  • Verify Persian date, number, currency, and text rendering.
  • Test browser receipts and thermal receipts with Persian text where the printer supports it.
  • Confirm the correct Iranian business identifier terminology before choosing the tax registration label. Rial is a currency, not a tax identifier.

Delivery checklist

  • Confirm terminology with an Iranian business user or accountant (شناسه ملی, کد اقتصادی, or another appropriate identifier).
  • Add IR to the shared country profile (fa-IR, IRR, Asia/Tehran, +98).
  • Add fa to the language types, setup flow, settings, server/KDS metadata, and HTML language handling.
  • Add fa.json and pass translation key-integrity checks.
  • Implement and visually verify RTL behavior across the main application surfaces.
  • Verify currency and number formatting, including the Rial/Toman distinction. Do not silently convert between units.
  • Verify browser printing and document direction.
  • Verify thermal printer encoding, Persian shaping, RTL order, and fallback behavior.
  • Add focused tests and update documentation.

Out of scope for the initial language/country contribution

  • This issue does not by itself promise official Iranian tax compliance or a complete Iranian tax pack. Tax rules should be added separately after they are verified.
  • Payment-provider, fiscal e-invoicing, and other Iran-specific integrations are separate work.

Contribution notes

This is broad enough to be split into smaller pull requests after someone takes ownership. A contributor who can provide or review native Persian translations and local tax terminology would be especially valuable. The initial implementation should avoid shipping a partial translation or an untested RTL layout as if support were complete.

Acceptance criteria

  • Persian can be selected during setup and in settings, persists server-side, and is inherited by the standalone KDS.
  • The main POS flows do not expose raw translation keys and render correctly in RTL.
  • Country selection for Iran supplies the expected locale, currency, timezone, and phone dial code.
  • Dates, amounts, and receipts are tested for the chosen Rial/Toman behavior.
  • Unsupported printer capabilities fail safely or use a documented fallback.
  • Existing English, Spanish, and Portuguese behavior remains unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions