[NTG-context] \mainlanguage[pe]

Wolfgang Schuster schuster.wolfgang at gmail.com
Wed Jul 6 20:30:08 CEST 2016

> Mohammad Hossein Bateni <mailto:bateni at gmail.com>
> 6. Juli 2016 um 20:02
> Hello,
> This was lost in the other thread, so I'm starting a fresh one 
> dedicated to the question.
> 1) \showinstalledlanguages does not show pe/persian/fa or anything 
> like that but it has several arabic variants.  was this dropped in 
> MkIV or was there never a persian language environment even in MkII?  
> I thought there were translated labels for Farsi somewhere.
> 2) In the following MWE, ad-hoc hyphenation using \- works and leads 
> to hyphenation.  However, specifying the pattern at the beginning does 
> not have any effect.  Am I missing something?
> \usemodule[simplefonts]
> \setmainfont[dejavusans][features=arabic,range=arabic]
> \setupalign[r2l]
> \showframe
> \hyphenation{سازمان‌-دهی}
> \starttext
> %% The above pattern is not used here and the long word moves into the 
> margin.
> \dorecurse{14}{سلام }
> سازمان‌دهی
> مناسب.
> %% It does work here, though.
> \dorecurse{14}{سلام }
> سازمان\-دهی
> مناسب.
> \stoptext
> How can one create a new language?  The languages manual 
> <http://www.pragma-ade.nl/general/manuals/languages-mkiv.pdf> suggests 
> that this is possible.  Does that mean I need to send the request to 
> Hans/Wolfgang to create the new entry or can one do so dynamically?  
> Beside the issue of sorting in indices, etc.—which I will get to in 
> due time—having an entry for language pe/persian seems to be necessary 
> to /properly/ use \setuplabeltext, etc.  Is that correct?
You can create a new language (and synonyms for it) with the 
\installlanguage command, below is a slightly modified version of the 
arabic entry. You can change the values for leftquotation etc. and send 
the result to Hans.

% this goes into mult-sys.mkiv

\definesystemconstant {persian}         \definesystemconstant {fa}

% this goes into lang-def.mkiv


\installlanguage [\s!persian] [\s!fa]


The default labels for the languages are stored in lang-txt.lua, you can 
add entries for persian and send the modified file to Hans.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20160706/d1ba3583/attachment.html>

More information about the ntg-context mailing list