Skip to content

Commit 4584058

Browse files
Merge pull request onfido#53 from onfido/bug/IX-1939-custom-localisation
Update read me for the custom translation section.
2 parents f3a1d2e + c6b2042 commit 4584058

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,24 +344,35 @@ Example
344344

345345
### 5. Localization
346346

347-
Onfido SDKs support a number of out-of-the-box translations. However, you can add your own translations.
347+
The SDK supports and maintains the following 6 languages:
348+
349+
- English (en) 🇬🇧
350+
- Spanish (es) 🇪🇸
351+
- French (fr) 🇫🇷
352+
- German (de) 🇩🇪
353+
- Italian (it) 🇮🇹
354+
- Portuguese (pt) 🇵🇹
355+
356+
However, you can add your own translations.
348357

349358
#### Android
350359

351360
By default, custom localisation is enabled on Android. There is no configuration needed on React Native SDK to enable it.
352361
You could also provide custom translation for a locale that we don’t currently support, by having an additional XML strings file inside your resources folder for the desired locale. See [Localisation section of Android SDK repo](https://github.com/onfido/onfido-android-sdk#4-localisation) for the details.
353362

354363
#### iOS
364+
You can also provide a custom translation for a locale that Onfido doesn't currently support.
365+
There is a simple configuration needed on the React Native SDK to enable custom localisation.
355366

356-
If you want to enable custom localisation, add this statement to your configuration object.
357-
367+
1. Add this statement to your configuration object.
358368
```
359369
localisation: {
360370
ios_strings_file_name: '<Your .strings file name in iOS app bundle>',
361371
},
362372
```
363-
364-
In this case SDK will show strings from the provided file. For more detailed explanation please check out [Localisation section of iOS SDK repo.](https://github.com/onfido/onfido-ios-sdk#language-customisation)
373+
2. Navigate to the iOS folder ```cd ios```, and open your XCode workspace.
374+
3. Follow the instructions for [iOS Localisation](https://medium.com/lean-localization/ios-localization-tutorial-938231f9f881) to add a new custom language or override existing translations.
375+
4. You can find the keys that need to be translated in the [iOS SDK repo](https://github.com/onfido/onfido-ios-sdk/blob/master/localization/Localizable_EN.strings).
365376

366377
## Creating checks
367378

0 commit comments

Comments
 (0)