Sha256: 32ebea670785f5fb2fa39c66df31cce1ff1e3271eb6f33002f1ef704f2010da7
Contents?: true
Size: 1.33 KB
Versions: 9
Compression:
Stored size: 1.33 KB
Contents
--- title: Webgen::Tag::Langbar used_options: - tag.langbar.separator - tag.langbar.show_own_lang - tag.langbar.show_single_lang - tag.langbar.lang_names --- ## Description This tag is used to display a list of links to translations of the page. The text that is displayed can be set via the configuration option `tag.langbar.lang_names` (if not set, the language code is shown). The option `tag.langbar.process_output` is useful in conjunction with `tag.langbar.lang_names` to display language flags. For example, you can use the following entries in `config.yaml`: tag.langbar.lang_names: en: | <img src="\{relocatable: img/flag_english.gif}" alt="English flag"/> English de: | <img src="\{relocatable: img/flag_german.gif}" alt="German flag"/> Deutsch tag.langbar.process_output: true This assumes that the `langbar` tag is *only* used in `src/default.template` and the flag images are under `src/img/` (otherwise the `relocatable` tag can correctly find the paths). To work around this, you could specify the `lang_names` directly in the `langbar` tag. ## Examples <table class="examples"> <tr> <th>Usage</th><th>Output</th> </tr> <tr> <td>\{langbar:}</td> <td>{langbar:}</td> </tr> <tr> <td>\{langbar: {lang_names: {en: Englisch}}}</td> <td>{langbar: {lang_names: {en: Englisch}}}</td> </tr> </table>
Version data entries
9 entries across 9 versions & 3 rubygems