小编Jpi*_*rno的帖子

带有从右到左语言参数的NSLocalizedString(如波斯语)


我写这篇文章是因为这个问题让我发疯了.
我有同样的问题尝试使用带参数的NSLocalizedStringUILabel中打印相同的文本(从右到左像波斯语).我的代码看起来像这样:

label.text = [NSString stringWithFormat:NSLocalizedString(@"The trick belongs to %@",nil),user];
Run Code Online (Sandbox Code Playgroud)

在波斯语的我的字符串文件中,我尝试使用它

"The trick belongs to %@" = " %@ ??? ?? ??? ???";
"The trick belongs to %@" = "%@ ????? ???? ?? ??";
"The trick belongs to %@" = "@% ????? ???? ?? ??";
"The trick belongs to %@" = "????? ???? ?? ?? @%";
"The trick belongs to %@" = "????? ???? ?? ?? %@";
Run Code Online (Sandbox Code Playgroud)

所有这种类型的表格总是打印:

"Mariaبرندهکارتهاشد"但必须显示为 "برندهکارتهاشدMaria"

提前谢谢了

objective-c arabic nslocalizedstring ios farsi

1
推荐指数
1
解决办法
1029
查看次数

标签 统计

arabic ×1

farsi ×1

ios ×1

nslocalizedstring ×1

objective-c ×1