我写这篇文章是因为这个问题让我发疯了.
我有同样的问题尝试使用带参数的NSLocalizedString在UILabel中打印相同的文本(从右到左像波斯语).我的代码看起来像这样:
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"
提前谢谢了