The goal of the subject is very simple: to carry out a function which returns only the name of the day of the week in a language chosen in this same function. In short, everything is in the function:
- the list of days of the week in different languages, whatever their alphabet;
- the list of transcribed languages (Latinized) when the chosen language is in an esoteric alphabet;
- the list of days of the week in understandable reference languages to have the names of the days of the week translated into other languages.
In a ComboBox of a form, all the languages listed in the function are listed. You choose a language from the list and in an individual cell appears the name of the day of the week in the chosen language. If the chosen language is in an incomprehensible alphabet (Russian or Armenian for example) and that in the function there is its Latinized transcription, then appears in another cell this same Latinized transcription, which helps singularly to try to pronounce the name of the day of the week. Indeed, when you do not know Russian or Hebrew, good luck deciphering! Finally, if desired, we can display, in a separate cell, the translation of the day of the week in a reference language (chosen in a ComboBox of the form) that we understand.
The function initially worked very well (in all cases) as long as you did not exceed 184 languages (which is already a lot!). Beyond that it no longer worked. So I had to split the function into 2 blocks, which wasn't very difficult. This allowed me to expand the list of languages without any problem. Everything is going perfectly well, except in one situation that I explain:
If I choose Armenian (Arménien in French), for example, this language is in the first function and it has its own completely incomprehensible alphabet. The name of the day of the week in Armenian appears, and in the cell just below its Latinized transcription. Everything is going very well.
Now we choose Chechen (Tchétchène in French), which is a language in the Cyrillic alphabet, but which this time is in the second function. The name of the day of the week in Chechen appears well; however, its Latinized transcription does not appear. And there I wonder why.
I made some minor changes in the ComboBox macro which lists the different languages.
SamT says: ”Since it is in French, I am unable to fully understand all the code.” In my last post (# 4), which obviously has not been read, in the attachment you will notice that I took care to translate all explanations (REM) into English. Everything else is written in VBA.
I wrote this feature just for fun and aesthetics, and to avoid having to put a language database on a separate sheet. As for APIs, sorry, too complicated for me ...
In conclusion, this function works very well, except for one detail which, I think, no longer depends directly on the function.
Last edited by Magic_Doctor; 04-12-2021 at 11:21 AM.