Feature Request: Case-insensitive key lookups

More
4 years 5 months ago #368 by Jos
Hello!

We have modified the internal storage to support case-insensitive key/key lookups, but would like this to be rolled into the product if possible. I figure some kind of bool to turn this on/off, although i'm not sure if you could change it back and forth very easily...

anyway, it would be nice to not have to worry about the exact upper/lower case spelling of all the keys. This might also require some kind of feedback when you get key-clashes due to different capitalizations of the same root string.

What do you think?

Thanks!
Jos

Please Log in or Create an account to join the conversation.

More
4 years 5 months ago #369 by Frank
Hi,

To allow case insensitive keys, you should only need to modify line 55 of LanguageSource from
public Dictionary<string, TermData> mDictionary = new Dictionary<string, TermData>();
into
public Dictionary<string, TermData> mDictionary = new Dictionary<string, TermData>(StringComparer.InvariantCultureIgnoreCase);

But as you said, the trickier part would be to show warnings when the key are clashing. Specially when they come from CSV or Google.

I added that into the roadmap. I'm trying to focus on mainly bug fixings for 2.3.2 and then will continue adding features.

Thanks,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
4 years 5 months ago #370 by Jos
Thanks for putting it on the roadmap! :) And also for the current-version hot-fix.

Peace
Jos

ps. Just an FYI, but another thing we use this for, especially now with the live-update, is to put some of our data into it, to allow the designers to set values at run-time, rather then having to do another build. For this specific usage one doesn't need multiple languages, and i've been trying to figure out how to have 2 instances of the LOC prefab, one for actual localization, and the other for "live data". Currently we just duplicate the data across the different languages. Just putting this into your ear as a possible "other" system, which could leverage the work you have already done on the LOC system. Would be (very) happy to chat with you about what this might look like, if you are interested. No worries if not. Thanks again for the all the work you have done! J

Please Log in or Create an account to join the conversation.

More
4 years 5 months ago #371 by Frank
Hi,
I'm glad you are also using the plugin to sync data as well.

That's one of the features I have in the roadmap and thats one of the reasons why the entire google synchronization was rewritten to happen while playing and not just in the editor.

I'm fact, I'm using it right now for my latest game Brush Master.
Currently, I'm just using a term in the source to keep an JSON representation of the settings, but I'm planning on adding a different type of data structure that could allow you accessing the spreadsheet as its in google and also extend that to allow downloading other files from the google drive. That should allow keeping gameplay settings in google drive without having to use CDN or other file repositories together with bundles for just tweaking settings.

That's still on the roadmap but if you could email me what options you think you could use or connect to chat on hangout it will be great.

Thanks,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

Time to create page: 0.110 seconds
Template by JoomlaShine