Closed mat1th closed 4 months ago
Hi @mat1th , thanks for reporting.
All keys are prefixed by parley_
already and we would allow overriding these when wanted (just like Android used to do).
However, as you describe, it currently only searches in the module bundle, making it impossible to override.
While the suggested solution could work, we are thinking of a different approach:
NSLocalizedString
always returns the key if it cannot be found. So to do this we could check if we get the key returned as result, and if so, take string from the sdk bundle instead.How does this sound to you?
We do also have the option in our app to overwrite the system locale. So for example a user does has his system language to en
while the app will use nl
while the app does also support en
.
With you supposed solution this will not work for us.
You are right on that one, in that case that won't work. Agreed, need to add handling texts in a different manner then.
As for the MessageImageViewController
, maybe we could set these with a key like "general" or so (there's the parley_close
for example which just should be Close
in EN for example.
Although separate text classes (like we do with appearance) might be too verbose for the goal of localizing the texts. I think an enum and a protocol would be a nice way, similar to how offline messaging and the network is separated with protocols.
Where:
Parley.setLocalizationManager(manager)
Just a first idea concept to think through, names/terms could change. How does this sound?
Hi @alexkok,
I've made a implementation on and opened a pr https://github.com/parley-messaging/ios-library/pull/113.
Describe the feature The SDK only supports 2 localizations for now the nl and en localization. We would like to support more languages in our app. For now this is only possible with manually adding translations because it is always searching in the SDK bundle.
Screenshot NA
Possible solution A possible solution would be to add the localization strings to the
Appearance
objects. There are only two kinds of places where this is not possible.Appearance
object (MessageImageViewController
). To solve this a newAppearance
object should be created.Parley
,Message+Accessibility
andMediaUploadNotificationErrorKind
. To solve this, the logic needs to be extracted and moved to the UI.Is this a okay solution, or do you want separate objects for the translations?