22.07.2013 Views

Sausalito Developer's Guide - Parent Directory

Sausalito Developer's Guide - Parent Directory

Sausalito Developer's Guide - Parent Directory

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4—8 Chapter 4: Using i18n and l10n in <strong>Sausalito</strong><br />

Beta Draft 11. Copyright ' 2001.Cobalt Networks, Inc. All Rights Reserved.<br />

Parameters<br />

v: a pointer to a valid i18n_vars object key -- a null-terminated string indicating the variable<br />

name<br />

value: a null-terminated string indicating the value of the named variable.<br />

Returns: Nothing.<br />

void i18n_vars_destroy (i18n_vars *v)<br />

Summary: destroys an i18n_vars object, and frees all memory associated with it.<br />

Parameters<br />

v: the pointer to the i18n_vars object to destroy<br />

Returns: Nothing.<br />

char *i18n_interpolate (i18n_handle *h, char *str,<br />

i18n_vars *vars)<br />

char *i18n_interpolate_html (i18n_handle *h, char *str, i18n_vars *vars)<br />

char *i18n_interpolate_js (i18n_handle *h, char *str,<br />

i18n_vars *vars)<br />

Summary: These three functions provide direct access to the interpolation functionality<br />

within the i18n library. The i18n_interpolate function does not escape it’s output at all.<br />

The i18n_interpolate_html function performs an additional escaping expansion on the<br />

string it returns, escaping it appropriately for use in HTML content.<br />

The i18n_interpolate_js function performs additional escaping, similar to the<br />

i18n_interpolate_html function, except that the string is escaped appropriately for use<br />

in JavaScript content.<br />

Parameters<br />

h: a pointer to a valid i18N_handle object.<br />

str: a null-terminated string to subject to interpolation, as described above.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!