voxeet / voxeet-uxkit-cordova

Dolby.io UXKit for Cordova
Other
1 stars 14 forks source link

i18n? #28

Closed feded closed 3 years ago

feded commented 3 years ago

Is there a way to change language for the callkit?

VTCoco commented 3 years ago

Hello, if you mean localizable strings yes you can override them. Create in your application you desired Localizable.strings and override:

(for UXKit:)

VTUX_CONFERENCE_STATE_CALLING = "We're waiting for other callers to arrive.";
VTUX_CONFERENCE_STATE_ENDED = "Call has ended.";
VTUX_CONFERENCE_STATE_DECLINED = "Declined call.";

VTUX_MICROPHONE_ALERT_TITLE = "Microphone permission";
VTUX_MICROPHONE_ALERT_MESSAGE = "Microphone permission is required in order to communicate with other people";
VTUX_MICROPHONE_ALERT_BUTTON_CANCEL = "Cancel";
VTUX_MICROPHONE_ALERT_BUTTON_SETTINGS = "Settings";

VTUX_CAMERA_ALERT_TITLE = "Camera permission";
VTUX_CAMERA_ALERT_MESSAGE = "Camera permission is required to activate the video";
VTUX_CAMERA_ALERT_BUTTON_CANCEL = "Cancel";
VTUX_CAMERA_ALERT_BUTTON_SETTINGS = "Settings";

(for CallKit:)

VT_NOTIFICATION_TITLE = "Incoming call from _HANDLE_";
VT_NOTIFICATION_BODY = "Conference: _CONFERENCE_ALIAS_";
VT_NOTIFICATION_ANSWER = "Answer"; // (used for UNUserNotificationCenter which have been deprecated with iOS 13)
VT_NOTIFICATION_DECLINE = "Decline"; // (used for UNUserNotificationCenter which have been deprecated with iOS 13)
feded commented 3 years ago

Great!! Thanks.

mattyg commented 3 years ago

For future reference if anyone needs. The android localization strings are as follows:

<string name="voxeet_call">Calling…</string>
<string name="voxeet_leaving">Call has ended…</string>
<string name="voxeet_incoming_call_text">Incoming call !</string>
<string name="voxeet_incoming_call_decline">Decline</string>
<string name="voxeet_incoming_call_accept">Accept</string>
<string name="voxeet_waiting_for_users">Waiting for users…</string>

To modify them from your cordova config.xml, use the <edit-config> tag:

<config-file target="res/values/strings.xml" parent="/resources"  mode="overwrite">
    <string name="voxeet_call">Starting video call...</string>
</config-file>