You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/how-tos/ui-library-sdk/includes/localization/android.md
+68-24Lines changed: 68 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,47 +14,91 @@ Azure Communication UI [open source library](https://github.com/Azure/communicat
14
14
15
15
### Available Languages
16
16
17
-
The following is table of `CommunicationUISupportedLocale` with out of the box translations. If you want to localize the composite, pass the `Locale` from `CommunicationUISupportedLocale` into `LocalizationConfiguration` as options into `CallComposite`.
17
+
The following is table of `CallCompositeSupportedLocale` with out of the box translations. If you want to localize the composite, pass the `Locale` from `CallCompositeSupportedLocale` into `CallCompositeLocalizationOptions` as options into `CallComposite`.
`LocalizationConfiguration` is an options wrapper that sets all the strings for Mobile UI Library components using a `CommunicationUISupportedLocale`. By default, all text labels use English strings. If desired `LocalizationConfiguration` can be used to set a different language by passing a `Locale` object from `CommunicationUISupportedLocale`. Out of the box, the UI library includes a set of `Locale` usable with the UI components and composites.
38
+
`CallCompositeLocalizationOptions` is an options wrapper that sets all the strings for Mobile UI Library components using a `CallCompositeSupportedLocale`. By default, all text labels use English strings. If desired `CallCompositeLocalizationOptions` can be used to set a different language by passing a `Locale` object from `CallCompositeSupportedLocale`. Out of the box, the UI library includes a set of `Locale` usable with the UI components and composites.
39
39
40
-
You can also obtain list of `Locale` by the static function `CommunicationUISupportedLocale.getSupportedLocales()`.
40
+
You can also obtain list of `Locale` by the static function `CallCompositeSupportedLocale.getSupportedLocales()`.
To use the `LocalizationConfiguration`, specify a `CommunicationUISupportedLocale` and pass it to the `CallCompositeOptions`. For the example below, we'll localize the composite to French.
46
+
To use the `CallCompositeLocalizationOptions`, specify a `CallCompositeSupportedLocale` and pass it to the `CallCompositeBuilder`. For the example below, we'll localize the composite to French.
47
47
48
-
```Kotlin
49
-
val callComposite:CallComposite=CallCompositeBuilder().localization(LocalizationConfiguration(CommunicationUISupportedLocale.FR).build()
Certain cultures (Arabic, Hebrew, etc.) may need for localization to have right-to-left layout. You can specify the `layoutDirection` as part of the `LocalizationConfiguration`. The layout of the composite will be mirrored but the text will remain in the direction of the string.
76
+
Certain cultures (Arabic, Hebrew, etc.) may need for localization to have right-to-left layout. You can specify the `layoutDirection` as part of the `CallCompositeLocalizationOptions`. The layout of the composite will be mirrored but the text will remain in the direction of the string.
val callComposite:CallComposite=CallCompositeBuilder().localization(LocalizationConfiguration(CommunicationUISupportedLocale.FR,LaytoutDirection.RTL)).build()
97
+
// CallCompositeSupportedLocale provides list of supported locale
0 commit comments