Yuan Yijun (bbbush) wrote,
Yuan Yijun
bbbush

i18n in XSLFO

这帮人总是不让我在 xslt 里面调用函数,传入待翻译字串,返回翻译好的字串。非得让我用常量。先加载一个 XML,然后里面有很多结点,每个节点都是一个待翻译字串,节点名必须与内容相关。比如说,<PortfolioConstituents>Portfolio Constituents</PortfolioConstituents>, 就是这个样子。可是,为啥不能调用函数呢,速度又不是很慢。

调用函数的话,有朝一日改用 xslt2,就可以把待翻译字串直接提取出来。常量呢,谁也控制不了。

避免修改代码?就刚才那一句,内容拼错了。我难道只修改内容,不修改节点名吗?如果修改了节点名,代码和所有翻译不是必须跟着修改吗?

如果用常量,怎么知道一个字串没有被翻译,或者翻译没有被同步?

It's just unusable.
Tags: 工作
Subscribe

  • 备份

    Google Groups will no longer be supporting the Welcome Message feature. Starting January 13, you won't be able to edit your welcome messages, but…

  • 在豆瓣申请主办方(FAIL!)

    http://www.douban.com/location/shenzhen/new_host 深圳 Linux Unix 用户组 szlug 南山实验学校鼎太部 SZLUG…

  • 2020

    Last time I wrote a review was in 2018, about 2017. Or maybe I wrote something elsewhere, maybe on Twitter? It was hard to write something freely…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments