Community Forum

Missing Text in l10n

Forum Overview >> Farming Simulator 2011

CategoryFarming Simulator 2011
Created02.02.2011 12:16

Sven Köhler (sven18koehler) 02.02.2011 12:19
I creat new FruitType with

FruitUtil.registerFruitType("fertilizer", ...);

in moddesc

<text name="fertilizer">

--> it works not!

I try this

g_i18n.texts["fertilizer"] = getXMLString(xmlFile, "modDesc.FruitI10n."..g_languageShort);

--> it works not!

This Error are inGame:

How I can fix it?


Stefan Geiger - GIANTS Software 04.02.2011 16:20
Ou this error is really unfortunate. There problem is that the code that creates this message is not ported to the new i18n system introduced in ls11 which should also take messages from mods. Unfortunately I don't see an easy way to bypass this error message.

There is one really hacky way. You could overwrite the function BaseMission.addWarning(text).

With a new function like this:

local oldAddWarning = BaseMission.addWarning;
local realI18NName = "Fertilizer";
BaseMission.addWarning = function(self, text)
assert(not g_i18n:hasText("fertilizer"));
if text == g_i18n:getText("fertilizer") .. g_i18n:getText("notAcceptedHere") then
text = realI18NName .. g_i18n:getText("notAcceptedHere");
oldAddWarning(self, text);

Note that it is important that you have NOT set the fertilizer i18n string, otherwise the code won't work.

Sven Köhler (sven18koehler) 04.02.2011 23:42
Thanks Stefan, for the answer! It work´s and the last Problem for this Mod are solved! :-)


Thomas Markmann (Unknown) 03.07.2011 15:35

Thomas Markmann (Unknown) 06.07.2011 21:31

Note: Log in to post. Create a new account here.