Module:ItemData/nav: Difference between revisionsGive feedback
added support for language subpages with more that 2 letters |
changed subpage detection logic |
||
| Line 4: | Line 4: | ||
local generic_module = require('Module:GenericData') | local generic_module = require('Module:GenericData') | ||
local util_module = require('Module:Utilities') | local util_module = require('Module:Utilities') | ||
--With debug_mode on, it outputs unprocessed wikitext | --With debug_mode on, it outputs unprocessed wikitext | ||
| Line 63: | Line 39: | ||
if slot == this_slot and this_cost >= min_souls and this_cost < max_souls then | if slot == this_slot and this_cost >= min_souls and this_cost < max_souls then | ||
local item_name_english = lang_module.get_string(item_key, "en") -- Get the English name | local item_name_english = lang_module.get_string(item_key, "en") -- Get the English name | ||
local lang_code = | local lang_code = lang_module.get_lang_code() -- Get the language code from the subpage | ||
local item_name_local = lang_module.get_string(item_key, lang_code) -- Get the localized name | local item_name_local = lang_module.get_string(item_key, lang_code) -- Get the localized name | ||