L20n 编辑

Note: This document is in draft form/out-of-date — for current documentation please see our documentation on GitHub.

A JavaScript localization framework to unleash your natural language's power with simple code.

Introducing L20n

L20n reinvents software localization. Users should be able to benefit from the entire expressive power of the natural language. L20n keeps simple things simple, and at the same time makes complex things possible.

Through L20n, Mozilla is creating a new generation of technology that places more power in localizers' hands. L20n lets localizers reach higher levels of free linguistic expression by sharpening the divide between localization and application logic. It allows to adapt your web application not only to languages and cultures, but also contextual data, user gender and screen dimensions.

What L20n looks like

Here is a simple, straightforward example showing an English string being provided:

<brandName "Firefox">
<about "About {{ brandName }}">

Here is the same string being provided in Slovenian:

<brandName {
  nominative: "Firefox",
  genitive: "Firefoxa",
  dative: "Firefoxu",
  accusative: "Firefox",
  locative: "Firefoxu",
  instrumental: "Firefoxom"
}>
<about "O {{ brandName.locative }}">

For Developers

Documentation for developers wanting to implement localization functionality on their web apps using L20n.

Internationalization for your web app
First read for developers looking to use the L20n infrastructure.
L20n's HTML bindings
Tutorial on implementing L20n in your HTML code.
L20n JavaScript API
An API for l20n.js.
L20n syntax cheatsheet for developers
A simple cheatsheet to help developers as they add L20n to their localization infrastructure.

For Localizers

Documentation for Localizers creating localized content for a project that uses L20n.

Learn the L20n syntax
How to naturally localize applications using L20n. Complete with use cases and examples of L20n in action.
Localization use-cases
How to naturally localize applications using L20n. Complete with use cases and examples of L20n in action.
L20n and Translation Memory eXchange (TMX)
How L20n impacts the Translation Memory eXchange standard for translation memory data.
L20n syntax cheatsheet for localizers
A simple cheatsheet to help localizers as they localize projects with L20n.

Some additional resources for developers and localizers involved with L20n.

L20n.org
You can try L20n live in your browser on the project page.
L20n Tinker
Test out your own L20n code in L20n Tinker.
GitHub
Where the main code for the L20n infrastructure and design spec lives.
Wiki page
Info about the project to develop L20n.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:102 次

字数:4173

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文