如何使用MessageFormat.js对SelectFormat进行转义'/'

我的messageformat字符串如下所示:{foo,select,one/two{1-2} other{3}},但是messageformat解析器由于其中/的使用而引发错误。

我已经尝试过,但是没有用:

{foo,one'/'two{1-2} other{3}}
{foo,'one/two'{1-2} other{3}}

有什么想法吗?

参考文献:
https://messageformat.github.io/messageformat/ https://messageformat.github.io/messageformat/page-guide#toc3__anchor

SanG_Soul 回答:如何使用MessageFormat.js对SelectFormat进行转义'/'

向图书馆的维护者提出了同样的问题,并得到了答案。现在不可能。需要找到其他解决方案,例如one_two

Reference

本文链接:https://www.f2er.com/3052276.html

大家都在问