MathParser.org-mXparser icon indicating copy to clipboard operation
MathParser.org-mXparser copied to clipboard

Translation to Portuguese

Open mariuszgromada opened this issue 2 years ago • 2 comments

USER_LANGUAGE = "Português";

mariuszgromada avatar Jul 05 '23 20:07 mariuszgromada

Is it Brazilian Portuguese or Portugal Portuguese? I can help with the Brazilian one.

Eskeminha avatar Aug 01 '23 19:08 Eskeminha

Awesome! I will contact you soon :-) Thanks

mariuszgromada avatar Aug 02 '23 22:08 mariuszgromada

If the operating system language is "pt", this language will be automatically set when the library starts. These options can be changed by using one of the following methods:

mXparser.disableSelectBestMatchingLanguage();
mXparser.enableSelectBestMatchingLanguage();
mXparser.checkIfSelectBestMatchingLanguage();

If you want to load the "pt" language regardless of your system settings, you can use one of the following syntax:

mXparser.changeLanguageTo("pt");
mXparser.changeLanguageTo(JAVAL: new Locale("...") / C#: new CultureInfo("..."));
StringModel.setStringResources(StringResources.bestMatchingLanguage("pt"));
StringModel.setStringResources(StringResources.bestMatchingLanguage(JAVAL: new Locale("...") / C#: new CultureInfo("...")));

If you have set a different language than the one used in the operating system and you would like to return to it from the OS, use:

mXparser.changeLanguageToBestMatching();
mXparser.enableSelectBestMatchingLanguage();
StringModel.setStringResources(StringResources.bestMatchingLanguage();

I recommend that you also pay attention to the following elements:

StringResources
StringResources.languageFrench()
StringModel
StringModel.setStringResources();
StringModel.setDefaultStringResources();
StringModel.setDefaultEnglishStringResources();
StringModel.getStringResources().print();
StringModel.print();

I hope you enjoy using it :-)

mariuszgromada avatar May 12 '24 19:05 mariuszgromada