Internalization file, how to create?

Asked

Viewed 66 times

2

Good afternoon, someone knows how to create the internalization file on Android ?

I want to create a.xml(en) strings, thank you.

1 answer

1


Very succinctly, you just need to create a directory, for example values-en within the res. The en means it is English. It could be fr, French, and so on.

This way for each key, you make the translation.

Example:

res/values

<string name="title_settings">Configurações</string>

res/values-en

<string name="title_settings">Configurations</string>

Read more here about Compatibility with different devices.

  • When I go in res > New>Directory add the name, it loads and closes, then when I go looking for the directory I can’t find and if I try to create again it says it already exists

  • Go to the folder where your project is located and create it yourself. You can even copy and paste the strings.xml. Then you’ll be back in the IDE and you’ll be there.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.