skip to Main Content

I have a set of textless PNG buttons that I did adding the text in photoshop in English and in Spanish, I don’t have the option to use the string file cause the text is already added in Photoshop. How do I use the spanish buttons if the user selects spanish language??…….

2

Answers


  1. PNG buttons that I did adding the text in photoshop

    –> that’s your main problem, trying to circumvent it will probably prove to be less efficient than using the framework’s built-in system to produce buttons with text and images (this question discusses how to do that). But if you can’t, you can probably use the system’s Locale to determine the language of the user, like so :

    Locale.getDefault().getLanguage()
    // this will return "en" for english
    
    Login or Signup to reply.
  2. The same as Spanish strings. You can use drawable-en and drawable-es same way as for strings – values-en, values-es. Put image for English into drawable-en, and for Spanish – into drawable-es

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search