The above explanations are correct, but they do not fully explain how to do this.
When you open your project in Android Studio, it automatically shows this project in Android mode. You need to click the “Android” tab in the upper left corner of Android Studio and select “ Project ”. Then you need to go to " application> src> main> res ". Then you need to right-click in the res folder, and in the menu that appears, select " New> Android resource directory . A dialog will appear, and for the directory name: enter -es and click OK .
This will create a folder for all Spanish values. And then you can right-click in this values-es folder to create the dimensions.xml , string.xml , color.xml , ... etc. files to be used whenever Spanish is selected on the phone.
If you have already created the string.xml file for the Spanish Locale via the graphical user interface, then the values-es folder with the string.xml file will already be in the project when you go there. And in this case, you just need to right-click in the values-es folder to create a file of a diameter.xml for the Spanish language.
source share