DoubleTapPlayerView icon indicating copy to clipboard operation
DoubleTapPlayerView copied to clipboard

How To translate

Open Mkurbanov opened this issue 4 years ago • 1 comments

On doubleTap has text "xx seconds". How can i Add own language?

Mkurbanov avatar Feb 18 '21 11:02 Mkurbanov

The library uses the plurals resource quick_seek_x_second to choose the correct value. Normally the resource is picked depending on the device language, otherwise it falls back to English.

You can check all supported/handled languages (by iso tag) here: Resources folder

You can add (or override) a language by putting the definition into the plurals file (res/values-xx). Simply copy an existing folder into your app's res folder and change the language code of it to, for example, values-de-DE. To adjust the value, just change the items as you wish:

<plurals name="quick_seek_x_second">
    <item quantity="other">%d seconds</item>
    <item quantity="one">%d second</item>
    <item quantity="many">%d seconds</item>
</plurals>

vkay94 avatar Mar 29 '21 16:03 vkay94