Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feature Request Ability to re-order and sort table entries

Discussion in 'Localization Tools' started by Wattosan, May 24, 2021.

  1. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    450
    Hello,

    It would be really nice if it was possible to manually re-order or sort localization table entries alphabetically.
    I usually try to group similar keys together in the table, however quite often I need to add a similar key some time later. The only place it will go to is the end of the table (unless I fiddle with the .asset files).

    An example can be seen here where I initially created keys with the "LABEL_" prefix and then added keys with different prefixes. And then later had to add other keys with the "LABEL_" prefix as well.
    upload_2021-5-24_16-29-1.png

    It would be nice if I could have keys alphabetically ordered so I can more easily find them in the drop-down. A solution is to use search but sometimes it's faster to find things if they are ordered.

    Thanks!
     
    denis_bogdanov likes this.
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    Try clicking the Key column label, you may be pleasantly surprised ;)
    This also works with Key id but not the Locales(maybe in the future).

    You can also reorder the items by clicking and dragging them although the UX needs improving here. I find it easiest to click inside of the Key Id field and drag from there. We probably need some sort of drag handle.
     
    Wattosan likes this.
  3. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    450
    Aah, nice! Ordering works. However, since I have the Key Id column disabled (unnecessary info for me) then I didn't even think to try to drag. How do you even do it without having it enabled? There's nowhere to grab.
     
  4. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    450
    Okay, I could drag from here, but this is not intuitive, yes. And this area doesn't scale with the window. It always stays small.
    upload_2021-5-25_12-30-9.png
     
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    Yeah that's the UX problem. It works when you drag the background but the background is only really visible in the Key ID column :(
    You can also click between cells. Its on the list of UX improvements we need to make.
     
    Wattosan likes this.
  6. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    450
    This is good to hear. Thank you for the solution! :)
     
    karl_jones likes this.
  7. KYL3R

    KYL3R

    Joined:
    Nov 16, 2012
    Posts:
    128
    Came here because I forgot how to sort the Locales.
    I had: DE, FR, IT, ... EN
    I wanted: EN, DE, FR, IT ...

    I once reordered it using drag&drop but could not find the draggable.
    However, the Locale files (for example "Spanish (es).asset" ) contain a field called "m_SortOrder: 4" - you can manually enter numbers (using notepad) and choose the desired order this way.
     
    karl_jones likes this.
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    You also should be able to change this value through the Locale inspector in the Editor or by reordering them in the LocalizationSettings, this will then set the sort order value for you.
     
    KYL3R likes this.
  9. KYL3R

    KYL3R

    Joined:
    Nov 16, 2012
    Posts:
    128
    Ah, see - I remember doing it using Drag&Drop somewhere :D

    Because I always search for it longer than I like to admit, here are the 2 spots to look out for:

    Localization Tables are "hidden" under the Asset Management. (I was usually looking for "Localization")



    The Localization Settings are under Project settings (neat, but I completely forgot about it)

    And here you can reoder as @karl_jones said - thanks :)


    bonus tip: if you want to change the language in editor (without the dropdown that appears in game-view during Play only...) then use the "Window -> Asset Management -> Localization Scene Controls" window :)
     
    karl_jones likes this.