l10n

Your forum for all discussions around Modding.
DuMoooH
Posts: 11
Joined: Fri Apr 29, 2022 8:12 pm

l10n

Post by DuMoooH »

Hello everyone. How do I now translate some objects to fs22? Previously, it was possible to translate in fs19 through the l10n_en(ru) file, but now what to do?
User avatar
Dogface
Posts: 1062
Joined: Mon Nov 28, 2016 3:02 pm
Location: PC ⛽ USA

Re: l10n

Post by Dogface »

It is the same, isn't it?

modDesc

Code: Select all

    <l10n>
        <text name="function_Trailer"> 
            <en>Trailer</en> 
            <de>Anhängerin</de> 
            <ru>Трейлер</ru>
        </text>
    </l10n>
DuMoooH
Posts: 11
Joined: Fri Apr 29, 2022 8:12 pm

Re: l10n

Post by DuMoooH »

Dogface wrote: Fri Apr 29, 2022 9:20 pm It is the same, isn't it?

modDesc

Code: Select all

    <l10n>
        <text name="function_Trailer"> 
            <en>Trailer</en> 
            <de>Anhängerin</de> 
            <ru>Трейлер</ru>
        </text>
    </l10n>
I tried it like this:
<text name="action_openGate">
<en>open Gate</en>
<ru>Open the gate</en>
</text>
there is no translation...
DuMoooH
Posts: 11
Joined: Fri Apr 29, 2022 8:12 pm

Re: l10n

Post by DuMoooH »

I drop the store in placeables, then register it in storeitems+placeable. I'm editing xml and this line doesn't translate: <controls posAction="ACTIVATE_HANDTOOL" triggerNode="15/5" posText="input_LIGHTSWITCH_CLICK_ON" negText="input_LIGHTSWITCH_CLICK_OFF" />
Prescribed as follows: <text name="input_LIGHTSWITCH_CLICK_ON">
<en>Turn on the light</en>
<ru>Turn on the light</en>
<<text name="input_LIGHTSWITCH_CLICK_OFF">
<en>Turn off the light</en>
<ru>Turn off the light</en>
</text>
Ziuta Modding
Moderator
Posts: 912
Joined: Sun Jul 17, 2016 9:40 am

Re: l10n

Post by Ziuta Modding »

You can't use the names used by the game, you must create your own, so eg.
clickOn_light
clicOff_light
DuMoooH
Posts: 11
Joined: Fri Apr 29, 2022 8:12 pm

Re: l10n

Post by DuMoooH »

Ziuta Modding wrote: Fri Apr 29, 2022 10:26 pm You can't use the names used by the game, you must create your own, so eg.
clickOn_light
clicOff_light
Unfortunately it didn't help((. Could it be because this action is in a completely different xml? for another object
Ziuta Modding
Moderator
Posts: 912
Joined: Sun Jul 17, 2016 9:40 am

Re: l10n

Post by Ziuta Modding »

Show your XML and modDesc
DuMoooH
Posts: 11
Joined: Fri Apr 29, 2022 8:12 pm

Re: l10n

Post by DuMoooH »

https://disk.yandex.ru/d/C57WJ2zN--qhVg
Ziuta Modding wrote: Fri Apr 29, 2022 10:49 pm Show your XML and modDesc
Ziuta Modding
Moderator
Posts: 912
Joined: Sun Jul 17, 2016 9:40 am

Re: l10n

Post by Ziuta Modding »

and object XML?

btw.
action_openGate
action_closeGate
action_openDoor
action_closeDoor

are used by the game so what you have in modDesc is not used at all

and the main error you have is that you put the <l10n> section in the <maps> section so now the path looks like this:
modDesc.maps.l10n
and it should be
modDesc.l10n

so this is how it should look like:

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="65">
    <author>DuMoH</author>
    <version>1.0.0.0</version>
    <title>
        <en>Lost valley</en>
        <ru>Затерянная долина</ru>
    </title>
    <description>
        <en><![CDATA[Welcome to the Lost Valley.This is a fictional map created in the European style.]]></en>
        <ru><![CDATA[Добро пожаловать на затерянную долину.Это вымышленная карта созданная в европейском стиле.]]></ru>
    </description>
    <iconFilename>icon.png</iconFilename>
    <multiplayer supported="true"/>
	
	<l10n>
		<text name="openingHours_closedDefault">
			<en>closed</en>
			<ru>Закрыто</ru>
		</text>   
		<text name="clickOn_light">
			<en>Turn on the light</en>
			<ru>Включить свет</ru>
		</text>
		<text name="clickOff_light">
			<en>Turn off the light</en>
			<ru>Выключить свет</ru>
		</text>
	</l10n>
	
    <maps>	
        <map id="SampleModMap" className="Mission00" filename="$dataS/scripts/missions/mission00.lua" configFilename="maps/map.xml" defaultVehiclesXMLFilename="maps/vehicles.xml" defaultPlaceablesXMLFilename="maps/placeables.xml" defaultItemsXMLFilename="maps/items.xml">
            <title>
                <en>Lost valley</en>
                <ru>Затерянная долина</ru>
            </title>
            <description>
                <en>Welcome to the Lost Valley.This is a fictional map created in the European style.</en>
                <ru>Добро пожаловать на затерянную долину.Это вымышленная карта созданная в европейском стиле.</ru>
            </description>
            <iconFilename>preview.png</iconFilename>
        </map>
    </maps>
</modDesc>
DuMoooH
Posts: 11
Joined: Fri Apr 29, 2022 8:12 pm

Re: l10n

Post by DuMoooH »

Ziuta Modding wrote: Fri Apr 29, 2022 10:59 pm and object XML?

btw.
action_openGate
action_closeGate
action_openDoor
action_closeDoor

are used by the game so what you have in modDesc is not used at all

and the main error you have is that you put the <l10n> section in the <maps> section so now the path looks like this:
modDesc.maps.l10n
and it should be
modDesc.l10n

so this is how it should look like:

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="65">
    <author>DuMoH</author>
    <version>1.0.0.0</version>
    <title>
        <en>Lost valley</en>
        <ru>Затерянная долина</ru>
    </title>
    <description>
        <en><![CDATA[Welcome to the Lost Valley.This is a fictional map created in the European style.]]></en>
        <ru><![CDATA[Добро пожаловать на затерянную долину.Это вымышленная карта созданная в европейском стиле.]]></ru>
    </description>
    <iconFilename>icon.png</iconFilename>
    <multiplayer supported="true"/>
	
	<l10n>
		<text name="openingHours_closedDefault">
			<en>closed</en>
			<ru>Закрыто</ru>
		</text>   
		<text name="clickOn_light">
			<en>Turn on the light</en>
			<ru>Включить свет</ru>
		</text>
		<text name="clickOff_light">
			<en>Turn off the light</en>
			<ru>Выключить свет</ru>
		</text>
	</l10n>
	
    <maps>	
        <map id="SampleModMap" className="Mission00" filename="$dataS/scripts/missions/mission00.lua" configFilename="maps/map.xml" defaultVehiclesXMLFilename="maps/vehicles.xml" defaultPlaceablesXMLFilename="maps/placeables.xml" defaultItemsXMLFilename="maps/items.xml">
            <title>
                <en>Lost valley</en>
                <ru>Затерянная долина</ru>
            </title>
            <description>
                <en>Welcome to the Lost Valley.This is a fictional map created in the European style.</en>
                <ru>Добро пожаловать на затерянную долину.Это вымышленная карта созданная в европейском стиле.</ru>
            </description>
            <iconFilename>preview.png</iconFilename>
        </map>
    </maps>
</modDesc>
Thank you so much
Post Reply