Jump to content

Can't seem to find the correct place to add decriptions in localization.txt


FramFramson

Recommended Posts

I have some weapons whose names do show up properly but which have no description and I would like to add one. Looked at the tutorials but they aren't explicitly specific on this particular point.

 

The header for these is:

 

Key,File,Type,UsedInMainMenu,NoTranslate,english,Context / Alternate Text,german,latam,(all the other languages, etc. etc...)

 

The corresponding line I have below is

 

pewpew,items,gun,,Pew Pew Gun,Pew Pew Gun,,,,,,,,,,,,,,

 

From what I can tell, the displayed name in game corresponds to 'NoTranslate' and 'english', so in this example the gun would be listed in game as 'Pew Pew Gun' (tested, & working fine). I tried adding the description text after the following comma, where it would align with "Context / Alternate Text" but that overwrites the menu item name for some reason???

 

I tried adding "Desc," to the header, as I've seen in some mod localizations, but this didn't work either.

 

Where exactly does the description text fit?

Link to comment
Share on other sites

7 hours ago, FramFramson said:

 

pewpew,items,gun,,Pew Pew Gun,Pew Pew Gun,,,,,,,,,,,,,,

 

The amount of commas seems off

 

From one of my mods:

 

BFTCraftingShotgunT1-1,progression,Attribute,,,Tier 1: Shotgun Shells,,,,,,,,,,,,,

 

Note that I have 3 commas between Attribute and the English description

Link to comment
Share on other sites

11 hours ago, BFT2020 said:

 

The amount of commas seems off

 

From one of my mods:

 

BFTCraftingShotgunT1-1,progression,Attribute,,,Tier 1: Shotgun Shells,,,,,,,,,,,,,

 

Note that I have 3 commas between Attribute and the English description

 

Does your header key match the one I'm using? Because I've seen different mods with slightly different Localization key headers.
 

Edited by FramFramson (see edit history)
Link to comment
Share on other sites

On 12/20/2023 at 1:22 AM, FramFramson said:

I have some weapons whose names do show up properly but which have no description and I would like to add one. Looked at the tutorials but they aren't explicitly specific on this particular point.

 

The header for these is:

 

Key,File,Type,UsedInMainMenu,NoTranslate,english,Context / Alternate Text,german,latam,(all the other languages, etc. etc...)

 

The corresponding line I have below is

 

pewpew,items,gun,,Pew Pew Gun,Pew Pew Gun,,,,,,,,,,,,,,

 

From what I can tell, the displayed name in game corresponds to 'NoTranslate' and 'english', so in this example the gun would be listed in game as 'Pew Pew Gun' (tested, & working fine). I tried adding the description text after the following comma, where it would align with "Context / Alternate Text" but that overwrites the menu item name for some reason???

 

I tried adding "Desc," to the header, as I've seen in some mod localizations, but this didn't work either.

 

Where exactly does the description text fit?

 

Descriptions need an entirely different line of CSV in the Localizations.txt file. This is because descriptions also need to be localized, they're not just in English.

 

If this is an item, then adding "Desc" after the item name will usually work. For example, if your item name is "pewpew" then the Key value would be "pewpewDesc":

pewpewDesc,items,gun,,,Pew Pew Guns go Pew Pew!,,,,,,,,,,,,,,

 

If that doesn't work, then you should add a "DescriptionKey" property to the item:

<property name="DescriptionKey" value="pewpewDesc"/>

 

Also: "NoTranslate" is a flag that tells 7D2D that it should not translate this key at all. It is not displayed to the user. In vanilla, it's used for proper nouns, like POI names. In Localization.txt, "X" represents "true" and an empty value represents "false." (I'm not sure what other values mean - A21 added "?" as a value, but there are also translations for those keys, so who knows what that value means.)

Edited by khzmusik (see edit history)
Link to comment
Share on other sites

9 hours ago, khzmusik said:

 

Descriptions need an entirely different line of CSV in the Localizations.txt file. This is because descriptions also need to be localized, they're not just in English.

 

If this is an item, then adding "Desc" after the item name will usually work. For example, if your item name is "pewpew" then the Key value would be "pewpewDesc":

pewpewDesc,items,gun,,,Pew Pew Guns go Pew Pew!,,,,,,,,,,,,,,

 

If that doesn't work, then you should add a "DescriptionKey" property to the item:

<property name="DescriptionKey" value="pewpewDesc"/>

 

Also: "NoTranslate" is a flag that tells 7D2D that it should not translate this key at all. It is not displayed to the user. In vanilla, it's used for proper nouns, like POI names. In Localization.txt, "X" represents "true" and an empty value represents "false." (I'm not sure what other values mean - A21 added "?" as a value, but there are also translations for those keys, so who knows what that value means.)

 

Ah. I was just using existing localization files from popular and stable weapons mod as a reference. Looking at a few more turned up use of the itemnameDesc tag, so that seems correct!

 

They all seem to retain NoTranslate in the key. Would best practice be to remove that from the header or to use an 'X' in the corresponding spot? (since I don't have alternate language names for the material).

Link to comment
Share on other sites

1 hour ago, FramFramson said:

 

Ah. I was just using existing localization files from popular and stable weapons mod as a reference. Looking at a few more turned up use of the itemnameDesc tag, so that seems correct!

 

They all seem to retain NoTranslate in the key. Would best practice be to remove that from the header or to use an 'X' in the corresponding spot? (since I don't have alternate language names for the material).

 

Most people find it to be best practice to use the same headers as vanilla. But technically, you can remove the headers you don't need (except for Key, and maybe File and Type, plus of course the language you're supporting). Just make sure the number of separators (i.e. commas) match.

 

Personally I use Google Sheets since it has built-in translation services, so I actually provide all the supported languages. YMMV.

Link to comment
Share on other sites

2 hours ago, khzmusik said:

 

Most people find it to be best practice to use the same headers as vanilla. But technically, you can remove the headers you don't need (except for Key, and maybe File and Type, plus of course the language you're supporting). Just make sure the number of separators (i.e. commas) match.

 

Personally I use Google Sheets since it has built-in translation services, so I actually provide all the supported languages. YMMV.

 

In this case I don't really need multilingual support, because it's just a personal edit of an existing mod. Though of course that can always change! But it's good to know for proper mod publishing. Thanks!

Link to comment
Share on other sites

On 12/20/2023 at 1:22 AM, FramFramson said:

I have some weapons whose names do show up properly but which have no description and I would like to add one. Looked at the tutorials but they aren't explicitly specific on this particular point.

 

Sorry about that!  I read this, but my brain went a completely different direction.  I was stuck on item names when you clearly were wanting descriptions.  I am going to blame it on the Covid I was dealing with, not old age  😉

 

It looks like khzmusik was able to answer your question properly.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...