Language Dialects
Posted: April 1st, 2022, 5:33 pm
With the Language feature, Google translate only allows for 1 German language. But I have an application where we would like to eventually have Austrian German and German German.
Since the Google Translate API service is only needed for the initial use, I could copy the existing dictionary for German and import it as a new language German-Austria. That almost solves the problem. The only issue is when a new message is added that needs to be translated again. For German-German, it runs the API and gets the new translation from the Google Translate service. For German-Austria it tries to run the service, but it passes in German-Austria and the API does not accept this value, so it doesnt find a translation. So in German-Austria language, the new text is shown in English. It is preferred that it too can get the german translation. Then if that latest translation is wrong, it can be edited in the dictionary.
The preferred functionality is for each language to store a name and a code that it uses to give to the Google Translate API if it needs more translations.
Since the Google Translate API service is only needed for the initial use, I could copy the existing dictionary for German and import it as a new language German-Austria. That almost solves the problem. The only issue is when a new message is added that needs to be translated again. For German-German, it runs the API and gets the new translation from the Google Translate service. For German-Austria it tries to run the service, but it passes in German-Austria and the API does not accept this value, so it doesnt find a translation. So in German-Austria language, the new text is shown in English. It is preferred that it too can get the german translation. Then if that latest translation is wrong, it can be edited in the dictionary.
The preferred functionality is for each language to store a name and a code that it uses to give to the Google Translate API if it needs more translations.