| OLD | NEW |
| 1 # Custom filters # | 1 # Custom filters # |
| 2 | 2 |
| 3 The following custom filters can be used on pages: | 3 The following custom filters can be used on pages: |
| 4 | 4 |
| 5 * `translate(default, name, comment=None)`: translates the given default string | 5 * `translate(default, name, comment=None)`: translates the given default string |
| 6 and string name for the current page and locale. The string name should be | 6 and string name for the current page and locale. The string name should be |
| 7 unique for the page but otherwise is only seen by the translators. Optionally | 7 unique for the page but otherwise is only seen by the translators. Optionally |
| 8 a comment (description) can be specified to help provide the translators with | 8 a comment (description) can be specified to help provide the translators with |
| 9 additional context. | 9 additional context. |
| 10 * `linkify(url, locale=None, **attrs)`: generates an `<a href="...">` tag for | 10 * `linkify(url, locale=None, **attrs)`: generates an `<a href="...">` tag for |
| 11 the URL. If the URL is a page name it will be converted into a link to the | 11 the URL. If the URL is a page name it will be converted into a link to the |
| 12 most appropriate page language. The language used can also be specified | 12 most appropriate page language. The language used can also be specified |
| 13 manually with the locale parameter. Any further keyword arguments passed | 13 manually with the locale parameter. Any further keyword arguments passed |
| 14 are turned into additional HTML attributes for the tag. | 14 are turned into additional HTML attributes for the tag. |
| 15 * `toclist(html)`: extracts a list of headings from HTML code, this can be used | 15 * `toclist(html)`: extracts a list of headings from HTML code, this can be used |
| 16 to generate a table of contents. | 16 to generate a table of contents. |
| 17 |
| 18 Prev: [Variables](variables.md) | Up: [Home](../../README.md) | Next: [Global fu
nctions](functions.md) |
| OLD | NEW |