-
-
Notifications
You must be signed in to change notification settings - Fork 673
Closed
Closed
Copy link
Description
🐛 Bug Report
I'm working with a standard transliteration of the variant of Farsi spoken in Afghanistan. The transliteration is written using Latin script. The BCP-47 standard tag is "fa-Latn-AF".
To Reproduce
This is what I am getting. The first method correctly returns rtl as Farsi is a right-to-left language.
The second method incorrectly returns rtl as well. Latin script is always a left-to-right language.
i18next.dir('fa-AF'); // -> "rtl";
i18next.dir('fa-Latn-AF'); // -> "rtl";
Expected behavior
I should be getting 'ltr' in the second method call but I am getting 'rtl'.
I suspect that the dir method is ignoring the Latn script setting and just using the 'fa' language to decide direction.
i18next.dir('fa-AF'); // -> "rtl";
i18next.dir('fa-Latn-AF'); // -> "ltr";
Your Environment
- runtime version: v22.14.0
- i18next version: v25.2.1
Metadata
Metadata
Assignees
Labels
No labels