Angularjs 使用角度Gettext转换JSON文件
我正在使用gettext来翻译我的AngularJS站点——在我可以添加“translate”的HTML属性的地方,一切都很好 然而,我也有一个相当大和复杂的JSON文件,需要翻译,其中包括数组和对象 有没有办法在gettext所做的翻译中将其包含到PO文件中?或者我需要重新考虑使用JSON文件分割客户流的整个想法吗 我在下面包含了JSON文件的初始摘录Angularjs 使用角度Gettext转换JSON文件,angularjs,gettext,angular-gettext,Angularjs,Gettext,Angular Gettext,我正在使用gettext来翻译我的AngularJS站点——在我可以添加“translate”的HTML属性的地方,一切都很好 然而,我也有一个相当大和复杂的JSON文件,需要翻译,其中包括数组和对象 有没有办法在gettext所做的翻译中将其包含到PO文件中?或者我需要重新考虑使用JSON文件分割客户流的整个想法吗 我在下面包含了JSON文件的初始摘录 { "version": "1.1", "name": "MVP", "description": "Initial custom
{
"version": "1.1",
"name": "MVP",
"description": "Initial customer segmenting flow",
"enabled": true,
"funnel": [
{
"text": "I am...",
"image": "",
"help": "",
"options": [
{
"text": "Placing an order",
"image": "image1.png",
"next": 2
},
{
"text": "E-mailing customer service",
"image": "image2.png",
"next": 2
},
谢谢
James在构建时使用脚本自己处理HTML文件,并使用字符串提取器所需的语法将所有可翻译的消息转储到一个虚拟源文件中,可能是这样的:
<translate>I am ...</translate>
<translate>Placing an order</translate>
<translate>E-mailing customer service</translate>
我是。。。
下订单
电子邮件客户服务