0

I am using takephoto_library for selecting multiple images.

https://github.com/crazycodeboy/TakePhoto

It is working properly but as you can see in the below screenshot, the caption is in Chinese.

I found that the view control is "com.darsh.multipleimageselect.activities" and Id of this caption is in the below

 actionBar.setTitle(R.string.album_view);

Is there any way to change this string to English?

enter image description here

2
  • you want to change "已选" to english ? Commented Oct 9, 2017 at 1:40
  • 1
    @JohnJoe Yes mate Commented Oct 9, 2017 at 1:42

3 Answers 3

1

Is there any way to change this string to English?

Yes, you can change all the Strings in strings.xml

https://github.com/crazycodeboy/TakePhoto/blob/master/takephoto_library/src/main/res/values/strings.xml

Change these two chinese word to english

<string name="add">确定</string>
<string name="selected">已选</string>

In English

 <string name="add">confirm</string>
 <string name="selected">selected</string>
Sign up to request clarification or add additional context in comments.

3 Comments

@KeLiuyue takephoto_library is added to my project as a jar. Should I remove it from the gradle and add it as a project?
Not really sure but I don't think you can change it if it is a library. Why not add it as manual instead of library ?
at worst, I will do that. Many thanks for your suggestion.
1

Try this .

find the strings.xml(values) and strings.xml(values-en) in the library of TakePhoto .

And change the string name to the English .

In the strings.xml(values)

string name="add">确定</string>
<string name="selected">已选</string>
<string name="limit_exceeded">最多能选 %d 张</string>

And add this to the strings.xml(values-en)

string name="add">confirm</string>
<string name="selected">selected</string>
<string name="limit_exceeded">You can choose%d at most</string>

And you can change this strings.xml(values-en) and strings.xml(values)

1 Comment

I'm going to try it now
1

For internationalization, android looks in different directories for the appropriate local as determined by your selection for the phone. For instance, you should see something like this:

./explorer/src/main/res/values-uk/strings.xml
./explorer/src/main/res/values-tr/strings.xml
./explorer/src/main/res/values-ru/strings.xml
./explorer/src/main/res/values-pl/strings.xml
./explorer/src/main/res/values-de/strings.xml
./explorer/src/main/res/values-ko/strings.xml
./explorer/src/main/res/values-sv/strings.xml
...

Where the translated strings are in the values-../strings as determined by the res/values/strings.xml. In my case, res/values/strings.xml has an entry:

<string name="createnewfolder">Create new folder</string>

which is translated in values-uk/strings.xml as

<string name="createnewfolder">Нова папка</string>

You might find Localizing with Resources useful.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.