Life is Feudal: Forest Village

Life is Feudal: Forest Village

Forest Village Workshop
Forest Village hub of user generated mods, maps and scenarios.
了解更多
Axe22 2 2018 年 2 月 4 日 下午 7:05
How to do localization in a CEGUI layout file using mod-local localization.csv entries? [Solved]
In CEGUI layout files some properties such as Text and Tooltip can be translated via the localization.csv file through the use of @ tags. For example:

<Property name="TooltipText" value="@MyTooltipTag@" />

At runtime it translates the tag using the global localization.csv file as a lookup dictionary.

There is a function called loc() whcih can be used to grab translations from the mod-local version of localization.csv which resides in the mod folder.

The problem is, you can't call the function loc from inside a CEGUI layout. Only the @tag@ syntax works there. And the @ syntax always uses the global localization dictionary, not the mod-local one.

I want to pull translations from my mod-local dictionary and use them in a CEGUI layout. Is there a syntax using the @ that will allow it?

I noticed that tooltips can have a special tag syntax:
@price[ModNumber].[ClassName]@
which allows the price icons to show up in tooltips on the Main Menu buttons.

Can I use something like:
@[ModNumber].[tagID]@ (e.g. "@10285546.MyTooltipTag@" )
or possibly
@[ModNumber].[tagIndex]@ (e.g. "@10285546.22@" )
to get this to happen?
最后由 Axe22 编辑于; 2018 年 2 月 13 日 上午 6:31
< >
正在显示第 1 - 2 条,共 2 条留言
cstoneburner 31 2018 年 2 月 9 日 下午 9:28 
@alprog, @MIB, any tips?
Axe22 2 2018 年 2 月 13 日 上午 6:31 
I have stumbled across the solution!
The answer is:

@ModNumber:TagName@

separate number and tag with a simple colon
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50