Closed Bug 204767 Opened 21 years ago Closed 4 years ago

Add Persian (Farsi) langgroup

Categories

(Core :: Internationalization, defect)

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: smontagu, Assigned: smontagu)

References

(Blocks 1 open bug)

Details

I have noticed when testing bugs on Farsi web pages that the text is often
rendered in a mixture of fonts, because the default Arabic fonts don't always
include characters that are used in Farsi. It would be helpful to be able to
specify different fonts for Farsi and Arabic.

The ISO-639 code for Farsi is "fa", but I'm not sure whether the correct English
name is "Farsi" or "Persian"
languageNames.properties currently has "Farsi" so we should probably stay with
that for consistency, even though
http://www.loc.gov/standards/iso639-2/langcodes.html says "Persian". 
The politically correct word to use in an English context is "Persian". That is
the ISO standard name for the language in all of its publications, a requirement
of Iranian Academy for Persian Language and Literature, and appears on the cover
of all bilingual dictionaries published here.

What can we do to fix languageNames.properties?
Summary: Add Farsi (Persian) langgroup → Add Persian (Farsi) langgroup
The change to languageNames.properties is included in the patch to bug 178491.
Blocks: 208295
See also bug 208295. Both these can be fixed by changes to a few properties files.
Depends on: 178491
The patch on bug 178491 has been checked in, but I'm not sure it actually fixes 
the bug as described by the reporter.
It's a bit more complex than a couple of additions in properties files. I know
this because I've recently added Tamil (x-tamil) lang group and enabled the font
selection menu for Devanagari and Tamil on Win32 and Xft-build. It's also
platform/toolkit dependent because the way fonts are selected based on langGroup
are platform/toolkit dependent.   

In case of Persian, it's not clear what has to be done. 'langGroups' in Mozilla
are actually  script tags. Thus, there's no langGroup such as en, fr, it, es,
ru, hi, and ta.  Instead, we have x-western,  x-cyrillic, x-devanagari, and
x-tamil. 

For Latin, we have x-western and x-central-europe, which could be a model ....

Because both Arabic and Persian use Arabic script, in theory we should have
x-arabic (instead of ar) and that should work for all the languages that use
Arabic 'script', but as Simon wrote that it doesn't work in practice. 
> Because both Arabic and Persian use Arabic script, in theory we should have
> x-arabic (instead of ar) and that should work for all the languages that use
> Arabic 'script', but as Simon wrote that it doesn't work in practice. 

Characters for Urdu and Farsi are almost identical and are part of the Arabic
Unicode set.  Direction and all other things remain same.  I hope that can be of
help.
Blocks: Persian
Ideally pages have a lang="fa" tag that is passed down to layou engine and a suitable Persian font is selected.  That's currently happening with fontconfig on ff3 IIRC, and the per-script font selection dialog has no effect.
QA Contact: amyy → i18n
Simon, is this still an issue?
Ehsan, I expect you read more Persian sites than I do :) If you think we don't need separate langgroups for Arabic and Persian, feel free to mark this WONTFIX.
(In reply to comment #10)
> Ehsan, I expect you read more Persian sites than I do :) If you think we don't
> need separate langgroups for Arabic and Persian, feel free to mark this
> WONTFIX.

Yeah :-)  The thing is, I'm not exactly sure how to tell whether this is an issue or not.  Currently, on Windows and Linux, a suitable Persian font is chosen by default whether the page includes lang="fa" or not.  But then again I don't have any font installed which has only Arabic and not Persian characters.

Can you guide me to be able to effectively detect whether this is an issue or not?
On Linux at least, proper language tags should be enough.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.