| Index: docs/api/functions.md |
| =================================================================== |
| new file mode 100644 |
| --- /dev/null |
| +++ b/docs/api/functions.md |
| @@ -0,0 +1,11 @@ |
| +# Global functions # |
| + |
| +The following global functions can be used on pages: |
| + |
| +* `get_string(name, page=None)`: retrieves a string from a locale file. |
| + Unless a page is specified the locale file matching the name of the current |
| + page is used. |
| +* `get_page_content(page, locale=None)`: returns a dictionary of the content |
| + and params for the given page and locale. Locale defaults to the current one |
| + if not specified. Provided keys include `head`, `body`, `available_locales` |
| + and `translation_ratio`. |