Page 1 of 1

Copying localization

Posted: Wed Jun 14, 2017 4:22 pm
by evildogbot100
How do I access standard localization? Example : I want to make a copy but stronger rocket-fuel item that will be translated to TRANSLATE(rocket-fuel).."2". With TRANSLATE(rocket-fuel) means whatever string factorio originally translate rocket-fuel item name into.

Re: Copying localization

Posted: Thu Jun 15, 2017 12:04 am
by 321freddy
Add this to your prototype:

Code: Select all

localised_name = {"", {"item-name.rocket-fuel"}, " 2"},
Works similarly with localised_description.

Localised strings are a table with the key as the first element. Keys are always written like "SECTION.ITEMNAME" where section is the section in the locale .cfg files.
When the key is an empty string the following table elements are used as is (they can also be localised strings).
You can read about localised string here.