前言
国际化app相关的权限弹框
I info.plist 的国际化
1.1 实现步骤:
- 新建一个 .strings文件 叫做InfoPlist.strings(文件名必须是这个)
- 新建以后,点击右侧的 localized
- 关键步骤:点击info.plist右键选择open as source code 查看我们所要获取权限的原始 key
/* InfoPlist.strings SWTextTool Created by mac on 2020/1/16. Copyright © 2020 KN. All rights reserved. */ "NSCameraUsageDescription" ="当前需要拍照来编辑功能,您是否允许打开相机?"; "NSPhotoLibraryAddUsageDescription" = "当前需要保存图片至相册,您是否允许?"; "NSPhotoLibraryUsageDescription"="当前功能需要访问您的相册来编辑功能,您是否允许打开相册?";
"NSMicrophoneUsageDescription" = "Allow this app to use your microphone for decibel detection and sound recording; audio is recorded locally only and is not sent to anyone, only for decibel detection and sound variation.";
1.2 案例:iOS APP 内的国际化切换
案例:登录界面切换中英文https://blog.csdn.net/z929118967/article/details/103733872