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

Language of UIActivityViewController Does not change when Reset #50

Open
mEldewaik opened this issue Jan 29, 2020 · 16 comments
Open

Language of UIActivityViewController Does not change when Reset #50

mEldewaik opened this issue Jan 29, 2020 · 16 comments

Comments

@mEldewaik
Copy link

mEldewaik commented Jan 29, 2020

When Change Language from english to Arabic Or reverse UIAlertViewController does not localized unless i restart the app please i need fix i faced this issue and tried alot but can not find solution.

`let activityViewController = UIActivityViewController(activityItems: sharingItems, applicationActivities: nil)

    if let avc = activityViewController.popoverPresentationController {
        avc.sourceView = sView
    }
    sender.present(activityViewController, animated: true, completion: nil)`

Image from iOS (1)
Image from iOS

@abdallahnh
Copy link
Collaborator

@mEldewaik did you tried UIAlertController instead, I'm using it and it is fine.

@mEldewaik
Copy link
Author

@abdallahnh i use UIAlertViewController to share text does UIAlertController do the same ?

@abdallahnh
Copy link
Collaborator

@mEldewaik yes sure it does

@mEldewaik
Copy link
Author

@abdallahnh the code please 🙏

@MoathOthman
Copy link
Owner

MoathOthman commented Jan 29, 2020

@mEldewaik can you share a screenshot of what are you trying to localize. I guess you mean UIActivityViewController not UIAlertViewController as there is no such thing AFAIK!

@mEldewaik
Copy link
Author

@MoathOthman yes i mean UIActivityViewController it can not be localized unless i close the app and open it again

@MoathOthman MoathOthman changed the title Language of UIAlertViewController Does not change when Reset Language of Other Frameworks and bundles Does not change when Reset Jan 29, 2020
@MoathOthman MoathOthman changed the title Language of Other Frameworks and bundles Does not change when Reset Language of UIAlertViewController Does not change when Reset Jan 29, 2020
@MoathOthman MoathOthman changed the title Language of UIAlertViewController Does not change when Reset Language of UIActivityViewController Does not change when Reset Jan 29, 2020
@MoathOthman
Copy link
Owner

I don\t there is a straight way to achieve it since its part of uikit and , check https://medium.com/@dark_torch/working-with-localization-in-swift-part-2-e7c8a660eb2a on "Other Frameworks and bundles" section , at best you get to change the localization but not the layout.

@mEldewaik
Copy link
Author

@MoathOthman i don't think it is the answer as it is already translated but its is not flipped and translated until i close and open the app again .

@MoathOthman
Copy link
Owner

@mEldewaik I don't think it is possible, but I will look into it soon.

@mEldewaik
Copy link
Author

@MoathOthman so can i disable localization for UIActivityViewController and use only english in all cases ?

@MoathOthman
Copy link
Owner

no because you don't have access to the layout code and the localization is handled in another bundle.

if you can find the localization keys for the strings in the activityview , then there is a way. but i forgot tbh how to do that, if you managed to do that please let me know.

@mEldewaik
Copy link
Author

@MoathOthman i saw before application support english and arabic and the UIActivityViewController only in english

@MoathOthman
Copy link
Owner

it would be interesting to be able to force certain language for certain strings, or even certain view controllers. am not aware of any currently, but will look into it.

@abdallahnh
Copy link
Collaborator

@mEldewaik i added some appearance changes please try from master and let me know if this fixed your issue

@mEldewaik
Copy link
Author

@abdallahnh so how can i test it please can you advice ?
how can i try your fix ?

@mEldewaik
Copy link
Author

@abdallahnh i download the pod and implement button and make a share but the issue still exist i can not find solution :(

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

3 participants