Template:Translation

From Heroes of Might and Magic: Olden Era Official Wiki
Revision as of 14:23, 14 July 2026 by Aurelain (talk | contribs) (Created page with "<includeonly><!-- -->{{#cargo_query: tables = Translation = T, Translation = E | join on = T.target_id = E.target_id | where = T.name = {{{1}}} AND T.language = {{{2|en}}} | fields = T.name | limit = 1 | more results text = }}<!-- ################################################################################ --></includeonly><noinclude> Retrieves the {{b|name}} value from the {{b|Translation}} Cargo table for a target id, in the desired lan...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Retrieves the name value from the Translation Cargo table for a target id, in the desired language.

This is very similar to the Label template, but is more generic, allowing you to pull any id from the Translation table, not just those prefixed with wiki_.

Usage

1. English Input: {{Translation | nature | en}}

Output:

Error 1054: Unknown column 'nature' in 'WHERE'

Function: CargoSQLQuery::run Query: SELECT `E`.`_pageID` AS `cargo_backlink_page_id_E`,`T`.`_pageID` AS `cargo_backlink_page_id_T`,`T`.`name` AS `name` FROM `mw4v_cargo__Translation` `T` LEFT OUTER JOIN `mw4v_cargo__Translation` `E` ON ((`T`.`target_id`=`E`.`target_id`)) WHERE `T`.`name` = nature

   AND `T`.`language` =  en  ORDER BY `E`.`_pageID`,`T`.`_pageID`,`T`.`name` LIMIT 100  

2. Japanese

Input: {{Translation | nature | ja}}

Output:

Error 1054: Unknown column 'nature' in 'WHERE'

Function: CargoSQLQuery::run Query: SELECT `E`.`_pageID` AS `cargo_backlink_page_id_E`,`T`.`_pageID` AS `cargo_backlink_page_id_T`,`T`.`name` AS `name` FROM `mw4v_cargo__Translation` `T` LEFT OUTER JOIN `mw4v_cargo__Translation` `E` ON ((`T`.`target_id`=`E`.`target_id`)) WHERE `T`.`name` = nature

   AND `T`.`language` =  ja  ORDER BY `E`.`_pageID`,`T`.`_pageID`,`T`.`name` LIMIT 100