菜鸟教程小白 发表于 2022-12-13 00:41:39

ios - MKRouteStep step.instruction 未本地化


                                            <p><p>我正在使用 mapKit 开发一个应用程序,我可以在其中使用 MKRouteStep 属性找到当前位置和目的地。现在我想把这些说明翻译成法语。<br/>
我该怎么做?<br/>我试过NSLocalizedString,但它不起作用。
在 Apple 文档中 <a href="https://developer.apple.com/library/ios/documentation/MapKit/Reference/MKRouteStep_class/Reference/Reference.html#//apple_ref/occ/instp/MKRouteStep/instructions" rel="noreferrer noopener nofollow">here</a> ,它说“此属性中的字符串已根据用户的语言偏好进行本地化。”,我的设备是法语的,但我仍然有英文说明...</p>

<p>任何帮助将不胜感激<br/>
谢谢</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>找到了。<br/>
只需打开项目的 info.plist,<br/> 然后将“Localizations”添加为 Infomation 属性列表,<br/>它将创建一个带有“English”的数组,只需添加另一个具有所需语言的项目(在我的情况下“法语”)<br/>
问候,</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - MKRouteStep step.instruction 未本地化,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/25266823/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/25266823/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - MKRouteStep step.instruction 未本地化