Localization of (Item Action Panel & ItemViewSlotForGrid)

Kindly, I was able to localize all the UIS demo for the UCC.
But still no luck with the localization of:
1) Item Action Panel:
I found it in the demo scene under "My Inventory Grid Panel/MainContent/Main Inventory Grid",
but I don't know how to localize and couldn't find any documentation about this point.

2) ItemViewSlotForGrid
I found it under "My Inventory Grid Panel/MainContent/Main Inventory Grid"
I followed the localization documentation, I created a new Localization table, translated the database content, and imported but how to connect this table to this grid?
Also, after creating this connection.
When I add a new item to the table (ex: new weapon) in the database, should I create a new key for this item in the localization table?
 
I assume you've read through this documenation page:

1)
Any static text can simply be replaced by your own loacalization text solution.
For any dynamic text, such as the options of the ItemActionPanel you mentioned. You can use the OnTextChange Event of the "ItemActionButton".
1680170633621.png
The documenation above explains how to use that event to let a AutoLocalizeStringEvent to update the string.
Essentially this will use the string set (in the case of the Item Action panel that's defined on each action) as the key of the localization table.

Even if you are not using the Unity localization system the same approach is valid for any localization system.

2)
For ItemViews you can use any kind of approach you want. You can make a custom ItemView script, or use the "Localize Item View" we provide in the localization integration. Also explained in the documenation linked above.

Yes, Any item (anything really) that will need to be localized need an key in the localization table. For items we use the item name usually. But you can use whatever you want of you plan on writing your own custom localization script.

I hope that helps
 
Dear,

Thanks a lot for your response.
Kindly, I was able to solve the first issue (1) partially, I was able to work on ItemActionButton which exists already in the demo scene under ItemActionPanel.
Also, I was able before to localize all the static button in the scene.
But, there are for example two (clones) from ItemActionButton prefab, loaded into the scene during runtime (for the Cancel and Drop options in the menu to equip, drop, cancel...etc),
I couldn't find out, which gameobject is calling the script to load those prefabs.
 
Thanks a lot for support.
Now the whole menu is localized.

I also, localized the description panel "Item Description" by adding two "Localize Item View" one for the Item name the other for the description.
On each Item name or description text, I added "Auto Localize String Event" and point it to the new Localization table.
It works fine, when I open the inventory in the runtime, and choose the localization. The Description panel displays the name and description localized.
But when I move the mouse on another ability or weapon "ItemViewSlotForGrid" it displays the default English localization.
Should I add any event or component to this "ItemViewSlotForGrid" or "Main Inventory Grid"?
 
That's odd, do you have multiple component (ItemViewModules) writing to the name text field?
Make sure you're not using a "NameItemView" and that you are using the "Localize Item View" from the integration that I mentioned before
 
After many tries and changing many options, and comparing it to the Demo scene. Now, the description's panel shows the default localization (en), but when I click any item and the menu show in the correct localization, when I close this menu, the description shows in the correct localization too.
 
I'm not sure I follow.
If it continues not to work, could you make a video and share it here (using streamable.com) that would really help me understand what is going on.
 
Thanks for your follow up.
Kindly find the video at the following link:

For example, the selected localization is French, so, it should display the French localization.
But the localization is displayed in EN.

And the localization is still in EN, when you move the mouse over any item.
But, when you open the menu of any item (Load, Equip...etc), then the localization is displayed in French.

Also, when you click outside any item, and then move the mouse on the item, the localization in French.
But when you click inside the item, move the mouse outside, and then move it back on the item, the localization displays in English.
 
Well that's an odd one...
You are using the AutoLocalizeStringEvent component to localize this text right?

The only thing that comes to mind is
1) There is a bug with the localization package cersion you are using
2) The AutoLocalizeStringEvent doesn't get updated if the text is disabled
3) You are writing the text twice at the same time and sometimes it doesn't realise it should localize it.


Out of curiosity. Can you make your description not disable on desselect (I believe that setting is set on the tooltip panel component usually the parent of the description).
If that fixes the issue, then most likely the problem is number 2.

Can also you send me some screenshot of your Description, anything that is relevant to writing the name of the item.
 
Dear,

You gave me the key to the solution, that maybe another object is writing back the values.
I found that I am using the AutoLocalizeStringEvent which is correctly setup, but I was passing the Text object the "Item Description Script", but when I removed it, everything works fine now.

Thanks a lot for your support.
 
Back
Top