I want to add languages that Calibre does not have in its database, such as Farsi (an alias for "Persian") and Hindavi (the precursor to Urdu and Hindi), so that I can use those languages in the Languages field for books. Is there any way to do that?
Farsi
Speakers of Persian (and related languages) usually use Farsi in their native languages to refer to Persian in the same way a French speaker would use Français to refer to French. However, no French speaker would ask a software developer to use Français also in English GUIs.
If you want to have Farsi as a menu option, you'll need to change the UI language to Persian or a related language.
Hindavi
Since Calibre uses ISO language codes internally and there are no ISO codes for Hindavi/Hindustani, it's not possible to add a Hindavi menu option. You'll have to use Hindi.