Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Compare: HTML Page Localization

Showing with 4 additions and 4 deletions.
  1. +4 −4 HTML-Page-Localization.md
8 changes: 4 additions & 4 deletions HTML-Page-Localization.md
Expand Up @@ -43,9 +43,9 @@ The page would be processed to:

The locale processor's parser is context-aware and escapes the text it inserts into the page using something like the approach described in [Using type inference to make web templates robust against XSS](http://js-quasis-libraries-and-repl.googlecode.com/svn/trunk/safetemplate.html).

### Dynamic Localization ###
### Dynamic Localization of Text ###

For localization of dynamic text in pages, i.e. text that is inserted into the DOM of a page by a page script after the page is loaded, the SDK injects an API into the pages that is like the one provided by the l10n CommonJS module for addon main programs.
For dynamic localization of text in pages, i.e. plaintext strings that are inserted into the DOM of a page by a page script after the page is loaded, the SDK injects an API into the pages that is like the one provided by the l10n CommonJS module for addon main programs.

*[Alternative: give pages access to CommonJS modules and make the API available via the l10n CommonJS module.]*

Expand Down Expand Up @@ -78,8 +78,8 @@ Would display an alert dialog with the text:

## Non-goals ##

1. Support localization of dynamic HTML, i.e. HTML content with locale-specific text that is dynamically inserted into a page, à la jQuery Templates. This doesn't seem essential for the initial implementation, although it may prove useful to implement in a later phase of development.
2. Implement a generic template processor. This proposal aims, instead, for interoperability with third-party template processors.
1. Dynamic Localization of HTML: processing HTML content with locale-specific plaintext strings that is dynamically inserted into a page, à la jQuery Templates (unlike dynamic localization of the plaintext strings themselves, which is covered in the *Dynamic Localization of Text* section above). This doesn't seem essential for the initial implementation, although it may prove useful to implement in a later phase of development.
2. Generic Template Processing: this proposal aims, instead, for interoperability with third-party template processors.

## References ##

Expand Down