At present i have hardcoded all the string for settings and other fields of my whole plugin code with English language. But when Obsidian changes the Application language, it only changes the core application interface language and the core plugins Interface language.
I was wondering if Obsidian could provide us a function, where we could pass the string we want to display in our settings and at other places which are not possible for user to change and the function will return us the translated version of the passed string into the language which Obsidian is currently set to by the user.
For example :
<div> {ObsidianLangTranslator("This setting helps you to change the language.")}</div>
I understand, Obsidian is also using an offline method, that is by keeping a map of English to all other languages. But, what I am suggesting is, in the same plugin folder, Obsidian can create a new json file, which will have the mapping to English string to all other languages, supported by Obsidian. This file can be created initially using an online translation API, when the plugin was installed. And later the data will be read from this json file for translation.