ARB Pleace持有人不工作

时间:2017-03-30 18:40:54

标签: javascript

我使用ARB google's API进行本地化,但实际上占位符不起作用我用了5个小时来解决这个问题而没有运气

arb.register(
"login", 
{
"title": "Login",
"subtitle": "to your account",
"MSG_BODY_TEST": "This is a test.",
"email": "Email {0}",
"@email": {
 "placeholders": {
   "0": {
      "example": "$123.45",
      "description": "cost presented with currency symbol"
   }
   }
},
"MSG_CURR_LOCALE": "...and the selected language is \"{currentLocale}\"."

}

);

    arb.register(
"login:ar", 
{
"title": "الدخول",
"subtitle": "الى حسابك",
"email": "البريد الاكتروني {0}",
"@email": {
 "placeholders": {
   "0": {
      "example": "$123.45",
      "description": "cost presented with currency symbol"
         }
         }
            },
    "MSG_CURR_LOCALE": "...and the selected language is \"          {currentLocale}\"."
    }

 );

有人能告诉我问题是什么吗?

1 个答案:

答案 0 :(得分:1)

好吧,尝试将"email": "Email {0}"替换为"email@placeholder": "Email"

检查一下:reference

还要移除不需要它的占位符支架