Default language prioritization

More
9 years 7 months ago #203 by Livealot
The up/down sort arrows in the Source Language editor don't work for me.

I also have never been prompted for a file location of the language file, but assume that is no longer required and the docs are just out of date.

I like your approach to try to pick a starting language for the user based on their device language. But I'm wondering how sensitive that is to the language codes. For example, if I put in fr-CA as my French default language, will it be served up to any of the French derivatives, or is it only 1:1 matching? Asked another way, would someone in France see Canadian-French or my default English when they first logged on?

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

More
9 years 7 months ago #209 by Frank
The plugin no longer requires external files, it saves all the data inside the LanguageSource object.
Having external files for each language was counterproductive, because even if the file was not loaded, the reference to that file made unity load part of it into memory.

So, when running a game, some of those localization was duplicated in memory.
Now, only one copy of the localization is stored. And the plugin has flags to also compress those localizations.

Although those flags are just defined, but the compression hasn't been implemented, Even huge localization files take just a few KB of memory, so it's not even worthy of the decompression step. That's why priority of that feature is a bit low. But eventually will be implemented in the plugin to save even more memory.


Regarding the languages, the plugin tries to match the exact one you are using, but if it can't find an exact match then it skips the region and uses just the languague part.
Which means that if your device is set to French, it will be able to use the fr-CA if thats set on your LanguageSource.

If the plugin can't find a matching language even after dropping the region, then it fallsback into using the first language in your Source.

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
9 years 7 months ago #212 by Livealot
Your prioritization method sounds really smart.

And getting rid of the extra external files sounds more efficient too.

But what about the sort arrows? It's not really important unless you didn't add your default language first, but I thought I'd pass it along in case it was a bug or giving others trouble.

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

More
9 years 7 months ago #216 by Frank
Hi,
I just checked the issue with the arrows. It was indeed a bug where the languages were not swapped.
I did a fix and will include it in the next release (2.2.1).

Nonetheles, you can replace your file with the attached one so you could have the arrows working right away :-)

Nice catch! Thanks,
Frank


Attachment LocalizationEditor_Languages.zip not found


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
Attachments:
The following user(s) said Thank You: Livealot

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

Time to create page: 0.382 seconds
Template by JoomlaShine