Google Sync Does not work at all
10 years 1 month ago #312
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Google Sync Does not work at all
Hi,
Don't worry, I'm not offended or anything!
I tested your code and indeed that was am issue with the latest version. Thanks for catching that up.
In previous version, the I2Languages.prefab was always loaded by default. So, when the call to GetTermTranslation was done, it query for the CurrentLanguage and as there was not one set, it initialized the plugin. But now the I2Languages is not loaded by default if you are not using a Localize component.
So, if you want to use everything from scripts, you need to init the plugin.
I added a condition now to the GetTermTranslation so that if the language is not defined when that function is called, it will start the initialization.
Thanks for catching that issue!!
Please, let me know anything else you can find!
Thanks,
Frank
Don't worry, I'm not offended or anything!
I tested your code and indeed that was am issue with the latest version. Thanks for catching that up.
In previous version, the I2Languages.prefab was always loaded by default. So, when the call to GetTermTranslation was done, it query for the CurrentLanguage and as there was not one set, it initialized the plugin. But now the I2Languages is not loaded by default if you are not using a Localize component.
So, if you want to use everything from scripts, you need to init the plugin.
I added a condition now to the GetTermTranslation so that if the language is not defined when that function is called, it will start the initialization.
Thanks for catching that issue!!
Please, let me know anything else you can find!
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.
10 years 1 month ago #313
by Stehlik
Replied by Stehlik on topic Google Sync Does not work at all
So another quick test
when I call first
LocalizationManager.CurrentLanguageCode
it does not load anything
I still have to call this to load resources
LocalizationManager.CurrentLanguage
and after that I can obtain my Language Code..
That makes me a sad panda
when I call first
LocalizationManager.CurrentLanguageCode
it does not load anything
I still have to call this to load resources
LocalizationManager.CurrentLanguage
and after that I can obtain my Language Code..
That makes me a sad panda
Please Log in or Create an account to join the conversation.
10 years 1 month ago #314
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Google Sync Does not work at all
I just added the InitializeIfNeeded to that as well.
Thanks!
Thanks!
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.
10 years 1 month ago #315
by Stehlik
Replied by Stehlik on topic Google Sync Does not work at all
Ok so the CurrentLanguageCode is not working in my favour
I mostly work with codes because they are more standardized then the name of the language...
set CurrentLanguageCode does actually nothing.
public static string CurrentLanguageCode
{
get { return mLanguageCode; }
set {
mLanguageCode = value;
IsRight2Left = IsRTL (mLanguageCode);
}
}
it does not change the language at all
also it does not write the language settings on disk.
I would recommend to highly unit test your code, as there are abviously methods which do nothing usefull
and can be missleading :-/
I mostly work with codes because they are more standardized then the name of the language...
set CurrentLanguageCode does actually nothing.
public static string CurrentLanguageCode
{
get { return mLanguageCode; }
set {
mLanguageCode = value;
IsRight2Left = IsRTL (mLanguageCode);
}
}
it does not change the language at all
also it does not write the language settings on disk.
I would recommend to highly unit test your code, as there are abviously methods which do nothing usefull
and can be missleading :-/
Please Log in or Create an account to join the conversation.
10 years 1 month ago #316
by Stehlik
Replied by Stehlik on topic Google Sync Does not work at all
Also I need to convert between Language name and Language code and I can't see any function which will do that
Please Log in or Create an account to join the conversation.
10 years 1 month ago #317
by Stehlik
Replied by Stehlik on topic Google Sync Does not work at all
Oh I see
GetLanguageCode
but is there also GetLanguageFromCode ?
GetLanguageCode
but is there also GetLanguageFromCode ?
Please Log in or Create an account to join the conversation.
Time to create page: 0.158 seconds