Template:Translate/doc: Difference between revisionsGive feedback
m fixed link to langcodes.json |
m link to module:dictionary if seeing %s in the string |
||
| Line 24: | Line 24: | ||
=When to use= | =When to use= | ||
This should only be used to translate text written in Templates, such as [[Template:Update layout]] which outputs "Patch notes" above the UI element. Page specific content should be translated on that page in that language, i.e. /Abrams/es or /Abrams/en | This should only be used to translate text written in Templates, such as [[Template:Update layout]] which outputs "Patch notes" above the UI element. Page specific content should be translated on that page in that language, i.e. /Abrams/es or /Abrams/en | ||
=Returned string has weird characters= | |||
If [[Template:Translate]] returns a string that has <code>%s</code> in it, it means it is expecting a parameter passed to be embedded in its place. Use [[Module:Dictionary]]'s <code>translate_embed</code> function instead for this case. The linked page includes documentation for how to use it. | |||
=Example= | =Example= | ||