I’m not sure what exactly do you mean by “automatically”, but having multiple languages to an app is usually called the process of “internationalization” (in short, i18n). You can have a translation file in your assets where all strings stored, then you can load the file and use the strings from selected language.
I was using RedPanda’s i18n extension for this job, but that was a long time ago, so I’m not sure if it still works in recent Android versions.