Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个 webapp,它使用自己的 API 来显示内容,它是通过 AJAX 实现的 javascript。 当我使用服务器端处理 (php) 时,我使用了 gettext,但现在我不知道如何翻译使用 javascript 生成的字符串。 我该怎么做? 谢谢
如果您熟悉Gettext的使用,请使用它的 JS 实现
http://jsgettext.berlios.de/
并通过调用 API 加载您的语言目录并localStorage用作缓存
localStorage