github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/language/scripts.go (about) 1 /* For license and copyright information please see LEGAL file in repository */ 2 3 package lang 4 5 const ( 6 // EnglishScript language code [4]byte{0,128,128,128} 7 EnglishScript uint32 = 0 8 // PersianScript language code [4]byte{0,129,128,128} 9 PersianScript uint32 = 1 10 ) 11 12 // Direction of scripts 13 const ( 14 LeftToRight uint8 = iota 15 RightToLeft 16 UpToDown 17 DownToUp 18 ) 19 20 // ScriptsDetail use to store other detail for a language 21 type ScriptsDetail struct { 22 Code uint32 23 Description []string 24 Dir uint8 25 CharectersIDs [][4]byte 26 } 27 28 // ScriptsDetails store all available script in a way to find by given ScriptCode 29 var ScriptsDetails = map[uint32]ScriptsDetail{ 30 EnglishScript: ScriptsDetail{ 31 Code: EnglishScript, 32 Description: []string{"English", "English"}, 33 Dir: LeftToRight, 34 }, 35 PersianScript: ScriptsDetail{ 36 Code: PersianScript, 37 Description: []string{"Persian", "پارسی"}, 38 Dir: RightToLeft, 39 }, 40 }