-
Notifications
You must be signed in to change notification settings - Fork 14
Added localization support #42
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for localization, id expect us to have to send the locale to the backend, which then makes decisions about what to return. its a user attributes / targeting feature. I think its done differently in the other sdks?
This reverts commit 81f5da2.
…server as its handled server side. Reverted local checks
…e views without requesting network updates
apiKey: apiKey, | ||
url: resolvedUrl, | ||
locale: "", | ||
locale: nil, //Always send to nil so as to get all options to allow for local changes without requiring an API call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its ok to make another API call. User properties are part of targeting and the content api may not return the correct content if locale is not passed and the targeting attributes are not accurate. locale also really shouldnt change at any point after the app is launched (it may, but if the screen isnt immediately reactive to it thats fine)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post discussions with @sanyamkamat aligned implementations with React.
Skipping locale in the Request was an additional step from me to reduce network calls in the sdk.
I will revert the change and pass locale if set by the user or Default. locale: locale ?? "Default"
Every subsequent change in locale will trigger a request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
locale is now passed in the content api as well as if required in the data binding http requests.
Added localization support to swift sdk targeting Text Images and Data Binding.
Users will have to specify localization for the pages/sections or leaving blank set it as "Default".
Every change to locale will trigger the content API call with the new values of locale thus refreshing the page.
*Added a fix to enable rendering of HTML lists OL LI in the text field. An issue with iOS 18 update needed it to be defined.
Example for images and text. Change is between french and english
Simulator.Screen.Recording.-.iPhone.16.-.2025-08-06.at.16.52.51.mov
Example of data binding Again french video list has different video links.
Simulator.Screen.Recording.-.iPhone.16.-.2025-08-06.at.16.51.55.mov
HTML List view Rendering in Text