You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unicode already has done the standardization of what the scripts should be called.
It is duplicate work to maintain a separate Array of "sanscript" specific names of scripts.
Using Intl.DisplayNames in JS, we can easily get the standard names of the script. These can then be programmatically inserted into Sanscript.t(text, "here", "here")
Unicode specific scripts' names can also be easily inserted into HTML's lang attribute like hi-Deva or hi-Latn.
Having sanscript's scripts' names like devanagari, bengali, etc. serves no purpose. They cannot be used inside HTML's lang. Also, we if anyway want the full names of the scripts we can always use Intl.DisplayNames. But this doesn't work with sanscript's scripts' names
For the scripts which doesn't have Unicode support, only those should be kept the same as being currently used, as they will never be used inside HTML's lang anyway, e.g. sanskritOCR
Approach
Of course, this will be a breaking change, so for the time being, you can simply copy+paste the current .json files inside the brahmic folder into Unicode-based names.
For e.g., for gujarati, bengali, etc. scripts, you can create new Gujr.json, Beng.json files with the same content as the gujarati.json, bengali.json, respectively.
The text was updated successfully, but these errors were encountered:
ManasMadrecha
changed the title
Change names of Scripts as per Unicode
Change names of Brahmic Scripts as per Unicode
Jun 30, 2021
Why?
Intl.DisplayNames
in JS, we can easily get the standard names of the script. These can then be programmatically inserted intoSanscript.t(text, "here", "here")
lang
attribute likehi-Deva
orhi-Latn
.sanscript
's scripts' names likedevanagari
,bengali
, etc. serves no purpose. They cannot be used inside HTML'slang
. Also, we if anyway want the full names of the scripts we can always useIntl.DisplayNames
. But this doesn't work withsanscript
's scripts' nameslang
anyway, e.g.sanskritOCR
Approach
Of course, this will be a breaking change, so for the time being, you can simply copy+paste the current
.json
files inside thebrahmic
folder into Unicode-based names.For e.g., for
gujarati
,bengali
, etc. scripts, you can create newGujr.json
,Beng.json
files with the same content as thegujarati.json
,bengali.json
, respectively.The text was updated successfully, but these errors were encountered: