Transchoice和Symfony中的yaml

时间:2015-10-31 02:34:52

标签: symfony translation

我确信Symfony中的yml翻译文件。字符串结构合理。

我的问题很简单:以下链接在复数字符串中是否有效?如果答案是肯定的,该怎么做?

product:
    list:
        plural: "{0} product.list.none|{1} product.list.one|]1,19] product.list.lower20|[20,Inf[ product.list.larger20"
        none: There is no product
        one: There is one product
        lower20: There are %count% products
        larger20: There are many products          

1 个答案:

答案 0 :(得分:3)

正确的语法是:

var array1 = new Array(3,5,2,7,6);
var array2 = new Array(5);
var i;
for(i=0; i<array1.length; i++) {
 array2[array2.length-i-1] = array1[i%3+1];
}
document.writeln(array2);