Localization Cheat Sheet
Jokers
-- using Joker Stencil as an example
localize({ type = 'name_text', set = "Joker", key = "j_stencil" }) or 'Joker Stencil'
Tarots/Planets/Spectrals/Consumables/etc.
-- taken from another mod of mine; "card_type" represents a consumable card
localize({ type = 'name_text', key = card.ability.extra.card_type.key, set = card.ability.extra.card_type.set }) or "None" -- should replace "None" with its own localization?
-- if you want the color of the card
local color = G.C.FILTER
if card.ability.extra.card_type ~= nil then
info_queue[#info_queue + 1] = card.ability.extra.card_type
color = G.C.SECONDARY_SET[card.ability.extra.card_type.set] or G.C.FILTER
end
Ranks
-- uses the key of a rank
localize("Ace", 'ranks') or "None"
-- uses the actual Rank from SMODS.Rank
localize(card.ability.extra.rank.key, 'ranks') or "None"
Suits
-- suit is a key
localize(suit, 'suits_singular') -- singular suit
localize(suit, 'suits')
Editions
-- using Polychrome as an example
localize({ type = 'name_text', key = "e_polychrome", set = "Edition" })
Enhancements
-- using Steel Cards as an example
localize({ type = 'name_text', set = "Enhanced", key = "m_steel" })
Seals (tbd)
-- note: these only localize the name, you have to add "Seal" after; using Blue Seals as an example
localize { type = 'name_text', set = "Other", key = 'blue_seal'}
-- string.lower(card.ability.extra.seal)..'_seal'
Misc.
"Face Cards" - k_face_cards
"Skip Reward" - b_skip_reward
"poker hand" - k_poker_hand
"Small Blind", "Big Blind" - bl_small, bl_big
"Deck" - k_deck