Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native IOS app startCallComposite Localization is in Hebrew and cannot change language #47

Open
JeronimoGarciaBielsa opened this issue Aug 11, 2024 · 4 comments

Comments

@JeronimoGarciaBielsa
Copy link

Hi! I am working on an app adding videocall, I can successfully start the calls but on IOS I cannot change the language. By default use Hebrew language and I do not know why. I tried to modify the swift files inside pods but I could not find where it is getting the languages.

Versions:
'AzureCommunicationUICalling', '1.9.0'
"react": "18.2.0",
"react-native": "0.72.2",

If anyone needs help for implementing this library I am free to help. This is a very powerful library and, once learn how to use it, very easy to add into an App

@ahammer
Copy link

ahammer commented Aug 14, 2024

Hi Jeronimo,

It sounds like you're encountering an issue with the localization behavior of the AzureCommunicationUICalling SDK on iOS. By default, the SDK applies the locale based on the device's settings, which might be why it's defaulting to Hebrew in your case.

To modify the language, you don't need to edit the Swift files directly inside the pods. Instead, you can use the SDK's localization APIs to set the desired language programmatically. You can refer to the official documentation on localization here for more detailed guidance.

If you still need help or if there's a specific part of the implementation that’s unclear, feel free to ask.

@JeronimoGarciaBielsa
Copy link
Author

Hi! I will try this. I am working on another task, but already set another in the board to investigate.
What I found strange is that on Android every thing works perfect, if I change the language inside the startCallComposite, it works find. I almost can see all the languages using the method getSupportedLocales() on Android, but on IOS just give an array with "en".

This is my startCallComposite:
try { await RNAzureCommunicationUICalling.startCallComposite( // local options { "displayName": "token1", "title": "token1", "subtitle": "token1", "disableLeaveCallConfirmation": false }, // localAvatarImageResource null, // remote options { "token": token1, "meeting": "${groupId-uuid}" }, // remoteAvatarImageResource null, // localization options { "locale": "it", "layout": false }, // orientationOptions { "setupOrientation": "PORTRAIT", "callOrientation": "PORTRAIT" } ) } catch (error) { console.error(error.message) }

If I set the locale to "it", on Android change but on IOS still in Hebrew "he"

try { const locales = await RNAzureCommunicationUICalling.getSupportedLocales() console.log(locales) } catch (error) { console.error(error) }

And this method on Android give me an array with all the languages, but on IOS give me an array with just "en", but do not work either in English, still Hebrew.

I will investigate, thanks! If I find a solution, I will give more information (Sorry about my english, I am from Argentina)

@ahammer
Copy link

ahammer commented Aug 22, 2024

Hi Jeronimo,

We've done some investigations on our side and have not as of yet been able to reproduce this issue.

Can you give more details about the devices used for testing? Is it only one iPhone? Simulator?

Are the bindings/samples being used without modification?

Can you tell me what is available in iOS SupportedLocale.values field?

Are you using this file for your bindings in a unmodified way?
https://github.com/Azure-Samples/communication-services-ui-library-react-native/blob/main/demo/ios/RNAzureCommunicationUICalling.swift

Please let us know if you have any more information.

@JeronimoGarciaBielsa
Copy link
Author

Hi! Sorry about the late answer. I still working on another task but next one is VideoCall

This error is on phisic iPhone and simulator iphone too ( I tried 15, 15pro, 14 ). Reading the doc I found this method who give us all the locales

try { const locales = await RNAzureCommunicationUICalling.getSupportedLocales() console.log(locales) } catch (error) { console.error(error) }
Output iOS => ["en"]

Output Android => ["ar", "ar", "de", "de", "en", "en", "en", "es", "es", "fi", "fi", "fr", "fr", "it", "it", "iw", "ja", "ja", "ko", "ko", "nb", "nl", "nl", "pl", "pl", "pt", "pt", "ru", "ru", "sv", "tr", "tr", "zh", "zh", "zh"]

The wear thing is on iOS said "en" as default but i see in hebrew. I am working for Italy so for now I modify the hebrew file with Italian. I found the locales and I just copy-paste the Italian language into the Hebrew. Just for keep going on in project.

I saw some updates and new commits that I must try. Maybe someone find a solution. Let me know if I can help with something else. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants