Function BlocLangues1$(Optional fecha As Date, Optional ChxLangue%, Optional NomLangue As Byte, Optional NbItems As Boolean = False, Optional transcription As Boolean = False, Optional LangueBase As Byte)
'Returns the day of the week corresponding to a date
'Limited to 150 languages
'- fecha : a date
'- ChxLangue : Choice of language. Ex: 1 -> Abkhaze | 2 -> Afrikaans | 3 -> Alabama | ...
'- NomLangue : 1 --> name of the language chosen in the matrix "langue"
' 2 --> day of the week, corresponding to the date "fecha", in the "LangueRef" matrix
' 3 --> name of the language understandable in the "LanguageRef" matrix
'- NbItems : if True --> number of languages listed in the function
'- transcription : if True --> checks if the chosen language is in an esoteric alphabet (Greek, Cyrillic ...) and searches for its latinized transcription
'- LangueBase : 1 -> "LangueRef" matrix for French | 2 -> "LangueRef" matrix for Spanish | ...
'WARNING! After any modification, do not forget to update "NbLangues" & the "Case" of "latinization"
'Magic_Doctor
Dim langue, NbLangues As Byte, latinisation, LangueRef
'Basic languages (understandable)
Select Case LangueBase
Case 1: LangueRef = Array("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Français")
Case 2: LangueRef = Array("Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Espagnol")
Case 3: LangueRef = Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Anglais")
Case 4: LangueRef = Array("Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado", "Portugais")
End Select
'Set of languages with which we want to indicate the names of the days of the week (whatever their alphabet)
Select Case ChxLangue
Case 1: langue = Array(ChrW(1040) & ChrW(1084) & ChrW(1213) & ChrW(1100) & ChrW(1231) & ChrW(1096), _
ChrW(1040) & ChrW(1096) & ChrW(1241) & ChrW(1072) & ChrW(1093) & ChrW(1100), _
ChrW(1040) & ChrW(1193) & ChrW(1072) & ChrW(1096), _
ChrW(1040) & ChrW(1093) & ChrW(1072) & ChrW(1096), _
ChrW(1040) & ChrW(1191) & ChrW(1096) & ChrW(1100) & ChrW(1072) & ChrW(1096), _
ChrW(1040) & ChrW(1093) & ChrW(1241) & ChrW(1072) & ChrW(1096), _
ChrW(1040) & ChrW(1089) & ChrW(1072) & ChrW(1073) & ChrW(1096), "Abkhaze")
Case 2: langue = Array("Sonndag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrydag", "Saterdag", "Afrikaans")
Case 3: langue = Array("Nihtahollo", "Nihta a" & ChrW(620) & ChrW(620) & "ámmòona", "Nihta atòkla", "Nihta atótchìina", "Nihta istóstàaka", "Nihta istá" & ChrW(620) & ChrW(620) & "àapi", "Nihtahollosi", "Alabama")
Case 4: langue = Array("E diel", "E hënë", "E martë", "E mërkurë", "E enjte", "E premte", "E shtunë", "Albanais")
Case 5: langue = Array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Allemand")
Case 6: langue = Array("Sonndich", "Mendich", "Denschdich", "Mittich", "Donnerschtich", "Fraidich", "Samschdich", "Allemand (Bavarois)")
Case 7: langue = Array("Sunntig", "Määntig", "Ziischtig", "Mittwuch", "Dunschtig", "Friitig", "Samschtig", "Allemand (Suisse)")
Case 8: langue = Array("Sunndi", "Mandi", "Zischdi", "Mittwuch", "Dunnerschdi", "Fridi", "Sàmschdi", "Alsacien")
Case 9: langue = Array(ChrW(&H12A5) & ChrW(&H1211) & ChrW(&H12F5), _
...
Case 144: langue = Array("S" & ChrW(229) & "dn" & ChrW(229) & "biejvve", "Lávvodahka", "Mánnodahkaa", "Dijstahka", "Gasskavahkkoò", "Duorastahka", "Bierjjedahka", "Same (de Lule)")
Case 145: langue = Array("Sotnabeaivi", "Vuossárga", "Ma" & ChrW(331) & ChrW(331) & "ebárga", "Gaskavahkku", "Duorastat", "Bearjadat", "Lávvardat", "Same (du Nord)")
Case 146: langue = Array(ChrW(198) & "jlege", "Maanta", "Dæjsta", "Gaskev" & ChrW(229) & "hkoe", "Duarsta", "Bearjadahke", "Laavvardahke", "Same (du Sud)")
Case 147: langue = Array("Pasepeivi", "Vuossargâ", "Majebargâ", "Koskokko", "Tuorâstâh", "Vástuppeivi", "Lávárdâh", "Same (Inari)")
Case 148: langue = Array("Pâ'sspei'vv", "Vu" & ChrW(&HF5) & "ssargg", "Mââi'bargg", "Seärad", "Nelljdpei'vv", "Piâtnâc", "Sue'vet", "Same (Skolt)")
Case 149: langue = Array("Aso S" & ChrW(257), "Aso Gafua", "Aso Lua", "Aso Lulu", "Aso Tofi", "Aso Faraile", "Aso To’ona’i", "Samoan")
Case 150: langue = Array("Nediel" & ChrW(279) & "s d" & ChrW(279) & "ina", "Panedielis", "Oterninks", "Sereda", "Ketvergs", "Perdreau", "Sobata", "Samogitien")
End Select
'WARNING! if you add a new language, move the last language to the function "BlocLangues2" so as not to exceed 150 languages
NbLangues = 150 'number of languages listed in the function
If transcription Then 'the chosen language is in an abstruse alphabet
'WARNING! Each "Case" must bear the same number as that of the language in the esoteric alphabet which is latinized
'Set of languages in abstruse alphabets that are latinized
Select Case ChxLangue
Case 1: latinisation = Array("Amçy" & ChrW(353), "A" & ChrW(353) & ChrW(1241) & "ax’", "Aoa" & ChrW(353), "Axa" & ChrW(353), "A" & ChrW(&H1E57) & ChrW(353) & "'a" & ChrW(353), "Ax" & ChrW(1241) & "a" & ChrW(353), "Asab" & ChrW(353), "Abkhaze")
Case 9: latinisation = Array("Ehud", "Senyo", "Maksenyo", "Voler", "Hamus", "Aarb", "Kidami", "Amharique")
Case 13: latinisation = Array("Kiraki", "Erku" & ChrW(353) & "abt'i", "Erek'" & ChrW(353) & "abt'i", ChrW(268) & "orek" & ChrW(353) & "abt'i", "Hing" & ChrW(353) & "abt'i", "Urbat '", "Sabat '", "Arménien")
Case 23: latinisation = Array("Nedelja", "Ponedelnik", "Vtornik", "Srjadá", ChrW(268) & "etv" & ChrW(259) & "rt" & ChrW(259) & "k", "Pet" & ChrW(259) & "k", "S" & ChrW(259) & "bota", "Bulgare")
Case 61: latinisation = Array("Kvira", "Or" & ChrW(353) & "abat'i", "Sam" & ChrW(353) & "abat'i", "Ot'x" & ChrW(353) & "abat'i", "Xut'" & ChrW(353) & "abat'i", "Paraskevi", ChrW(352) & "abat'i", "Géorgien")
Case 62: latinisation = Array("Kyriak" & ChrW(7703), "Deytéra", "Trít" & ChrW(275), "Tetárt" & ChrW(275), "Pémpt" & ChrW(275), "Paraskey" & ChrW(7703), "Sávvato", "Grec")
Case 70: latinisation = Array("Yôm ri'" & ChrW(353) & "ôn", "Yôm " & ChrW(353) & "enî", "Yôm " & ChrW(353) & "lî" & ChrW(353) & "î", "Yôm rvî" & ChrW(&H2BF) & "î", "Yôm hamî" & ChrW(353) & "î", "Yôm " & ChrW(353) & "i" & ChrW(353) & "î", "Yôm " & ChrW(353) & "abat", "Hébreu")
Case 78: latinisation = Array("Nichiy" & ChrW(333) & "bi", "Getsuy" & ChrW(333) & "bi", "Kay" & ChrW(333) & "bi", "Suiy" & ChrW(333) & "bi", "Mokuy" & ChrW(333) & "bi", "Kiny" & ChrW(333) & "bi", "Doy" & ChrW(333) & "bi", "Japonais")
Case 82: latinisation = Array("Zheksenbe", "Düysenbi", "Seysenbi", "Särsenbi", "Beysenbi", "Juma", "Senbi", "Kazakh")
Case 84: latinisation = Array("Jek" & ChrW(&H219) & "embi", "Dü" & ChrW(&H219) & "ömbü", ChrW(&H218) & "ey" & ChrW(&H219) & "embi", ChrW(&H218) & "ar" & ChrW(&H219) & "embi", "Bey" & ChrW(&H219) & "embi", "Juma", "I" & ChrW(&H219) & "embi", "Kirghize")
Case 89: latinisation = Array("Al" & ChrW(&H1E29) & "at", "Itni", "Ttalat", "Arva" & ChrW(&H1E29), "Xamis", "Nju" & ChrW(382) & "mar", "Xxullun", "Lak")
Case 115: latinisation = Array("duminic" & ChrW(259), "Luni", "Mar" & ChrW(355) & "i", "Miercuri", "Joi", "Vineri", "Sâmb" & ChrW(259) & "t" & ChrW(259), "Moldave")
Case 117: latinisation = Array("Nyam", "Davaa", "Myagmar", "Lkhagva", "Pürev", "Baasan", "Byamba", "Mongol")
Case 142: latinisation = Array("Voskresen’ye", "Ponedel’nik", "Vtornik", "Sreda", "Chetverk", "Pyatnitsa", "Subbota", "Russe")
End Select
On Error Resume Next 'otherwise, oddly enough, it crashes
BlocLangues1 = latinisation(Weekday(fecha) - 1) 'latinized day of the week (Base Option 0). If not -> ""
ElseIf NbItems Then
BlocLangues1 = NbLangues 'total number of languages listed in the function
ElseIf NomLangue = 1 Then
BlocLangues1 = langue(7) 'name of the chosen language
ElseIf NomLangue = 2 Then
BlocLangues1 = LangueRef(Weekday(fecha) - 1) 'day of the week, corresponding to the date "fecha", in an understandable language (Option Base 0)
ElseIf NomLangue = 3 Then
BlocLangues1 = LangueRef(7) 'understandable language name
Else
BlocLangues1 = langue(Weekday(fecha) - 1) 'day of the week, corresponding to the date "fecha", in the chosen language (Base Option 0)
End If
End Function
Function BlocLangues2$(Optional fecha As Date, Optional ChxLangue%, Optional NomLangue As Byte, Optional NbItems As Boolean = False, Optional transcription As Boolean = False, Optional LangueBase As Byte)
'Renvoie le jour de la semaine correspondant à une date
'Returns the day of the week corresponding to a date
'Limited to 150 languages
'- fecha : a date
'- ChxLangue : Choice of language. Ex: 1 -> Abkhaze | 2 -> Afrikaans | 3 -> Alabama | ...
'- NomLangue : 1 --> name of the language chosen in the matrix "langue"
' 2 --> day of the week, corresponding to the date "fecha", in the "LangueRef" matrix
' 3 --> name of the language understandable in the "LanguageRef" matrix
'- NbItems : if True --> number of languages listed in the function
'- transcription : if True --> checks if the chosen language is in an esoteric alphabet (Greek, Cyrillic ...) and searches for its latinized transcription
'- LangueBase : 1 -> "LangueRef" matrix for French | 2 -> "LangueRef" matrix for Spanish | ...
'WARNING! After any modification, do not forget to update "NbLangues" & the "Case" of "latinization"
'Magic_Doctor
Dim langue, NbLangues As Byte, latinisation, LangueRef
'Basic languages (understandable)
Select Case LangueBase
Case 1: LangueRef = Array("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Français")
Case 2: LangueRef = Array("Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Espagnol")
Case 3: LangueRef = Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Anglais")
Case 4: LangueRef = Array("Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado", "Portugais")
End Select
'Set of languages with which we want to indicate the names of the days of the week (whatever their alphabet)
Select Case ChxLangue
Case 1: langue = Array("Lâyenga", "Bïkua-ôko", "Bïkua-ûse", "Bïkua-otâ", "Bïkua-usïö", "Bïkua-okü", "Lâpôso", "Sängö")
Case 2: langue = Array("Dumíniga", "Lunis", "Martis", "Mèrcuris", "Giòvia", "Chenàbura", "Sàbadu", "Sarde")
Case 3: langue = Array("Sunday", "Monanday", "Tysday", "Wadensday", "Fuirsday", "Friday", "Seturday", "Scots")
Case 4: langue = Array("Sontaga", "Mosupalogo", "Labobedi", "Laboraro", "Labone", "Labohlano", "Mokibelo", "Sepedi")
Case 5: langue = Array(ChrW(1053) & ChrW(1077) & ChrW(1076) & ChrW(1077) & ChrW(1114) & ChrW(1072), _
ChrW(1055) & ChrW(1086) & ChrW(1085) & ChrW(1077) & ChrW(1076) & ChrW(1077) & ChrW(1114) & ChrW(1072) & ChrW(1082), _
ChrW(1059) & ChrW(1090) & ChrW(1086) & ChrW(1088) & ChrW(1072) & ChrW(1082), _
ChrW(1057) & ChrW(1088) & ChrW(1077) & ChrW(1076) & ChrW(1072), _
ChrW(1063) & ChrW(1077) & ChrW(1090) & ChrW(1074) & ChrW(1088) & ChrW(1090) & ChrW(1072) & ChrW(1082), _
ChrW(1055) & ChrW(1077) & ChrW(&H442) & ChrW(1072) & ChrW(1082), _
ChrW(1057) & ChrW(1091) & ChrW(1073) & ChrW(1086) & ChrW(1090) & ChrW(1072), "Serbo-Croate")
...
Case 44: langue = Array("Alhadi", "Atinni", "Atalata", "Alarba", "Alamisi", "Alzuma", "Asibiti", "Zarma")
Case 45: langue = Array("Yew" & ChrW(&H15F) & "eme", "Di" & ChrW(&H15F) & "eme", "Sê" & ChrW(&H15F) & "eme", "Çar" & ChrW(&H15F) & "eme", "Pan" & ChrW(&H15F) & "eme", "Îne", ChrW(&H15E) & "eme", "Zazaki")
Case 46: langue = Array("iSonto", "uMombuluko", "uLwesibili", "uLwesithathu", "uLwesine", "uLewishlanu", "uMgqibelo", "Zoulou")
Case 47: langue = Array("Sælldé", "Lúnidé", "Mærturdé", "Mjörkridé", "Hordes", "Ýnirrdé", "Sætnidé", ChrW(&HDE) & "rjótrunn " & ChrW(9775))
End Select
'WARNING! Update the "NbLangues" variable if you add a new language
NbLangues = 47 'number of languages listed in the function
If transcription Then 'the chosen language is in an abstruse alphabet
'WARNING! Each "Case" must bear the same number as that of the language in the esoteric alphabet which is latinized
'Set of languages in abstruse alphabets that are latinized
Select Case ChxLangue
Case 5: latinisation = Array("Nedelja", "Ponedeljak", "Utorak", "Srijeda", ChrW(268) & "etvrtak", "Petak", "Subota", "Serbo-Croate")
Case 18: latinisation = Array("Âk" & ChrW(353) & "anbe", "Du" & ChrW(353) & "anbe", "Se" & ChrW(353) & "anbe", ChrW(268) & "or" & ChrW(353) & "anbe", "Panç" & ChrW(353) & "anbe", "Çum’a", ChrW(352) & "anbe", "Tajik")
Case 21: latinisation = Array("K’irande", "Orshot", "Shinara", "Qaara", "Eara", "P’eraska", "Shot", "Tchétchène")
Case 22: latinisation = Array("It" & ChrW(299) & " senibeti", "It" & ChrW(299) & " senuyi", "It" & ChrW(299) & " selusi", "It" & ChrW(299) & " rebu‘i", "It" & ChrW(299) & " " & ChrW(7717) & "amusi", "It" & ChrW(299) & " ‘arib" & ChrW(299), "It" & ChrW(299) & " k'edami", "Tigrinya")
Case 28: latinisation = Array("Nedilya", "Ponedilok", "Vivtorok", "Sereda", "Chetver", "P'jatnycja", "Subota", "Ukrainien")
Case 43: latinisation = Array("Zuntik", "Montik", "Dinstik", "Mitvokh", "Donershtik", "Fraytik", "Shabes", "Yiddsh")
End Select
On Error Resume Next 'otherwise, oddly enough, it crashes
BlocLangues2 = latinisation(Weekday(fecha) - 1) 'latinized day of the week (Base Option 0). If not -> ""
ElseIf NbItems Then
BlocLangues2 = NbLangues 'total number of languages listed in the function
ElseIf NomLangue = 1 Then
BlocLangues2 = langue(7) 'name of the chosen language
ElseIf NomLangue = 2 Then
BlocLangues2 = LangueRef(Weekday(fecha) - 1) 'day of the week, corresponding to the date "fecha", in an understandable language (Option Base 0)
ElseIf NomLangue = 3 Then
BlocLangues2 = LangueRef(7) 'understandable language name
Else
BlocLangues2 = langue(Weekday(fecha) - 1) 'day of the week, corresponding to the date "fecha", in the chosen language (Base Option 0)
End If
End Function