Module:Dictionary/doc: Difference between revisionsGive feedback
m →Important translations: phrasing |
m now includes show_needs_translation and better examples |
||
| Line 9: | Line 9: | ||
*'''key''' - key to translate | *'''key''' - key to translate | ||
*'''lang_code_override''' (OPTIONAL, Named parameter) - language code that overrides current language. See supported list at [[Data:LangCodes.json]]. | *'''lang_code_override''' (OPTIONAL, Named parameter) - language code that overrides current language. See supported list at [[Data:LangCodes.json]]. | ||
*'''show_needs_translation''' (OPTIONAL, Named parameter) - boolean that determines if the {{NeedsTranslationTooltip}} is appended when its unable to be translated. Defaults to 'true' | |||
===Example=== | ===Example=== | ||
Example where translation does exist<br> | |||
<code><nowiki>{{#invoke:Dictionary|translate|Update history|lang_code_override=en}}</nowiki></code> | |||
Outputs | |||
{{#invoke:Dictionary|translate|Update history|lang_code_override=en}} | |||
Example where translation does not yet exist<br> | |||
<code><nowiki>{{#invoke:Dictionary|translate|Update history|lang_code_override=es}}</nowiki></code> | <code><nowiki>{{#invoke:Dictionary|translate|Update history|lang_code_override=es}}</nowiki></code> | ||
| Line 16: | Line 26: | ||
{{#invoke:Dictionary|translate|Update history|lang_code_override=es}} | {{#invoke:Dictionary|translate|Update history|lang_code_override=es}} | ||
Example where translation does not yet exist but displaying the tooltip is off<br> | |||
<code><nowiki>{{#invoke:Dictionary|translate|Update history|show_needs_translation=false}}</nowiki></code> | |||
Outputs | |||
{{#invoke:Dictionary|translate|Update history|show_needs_translation=false}} | |||
==translate_embed== | ==translate_embed== | ||