Universal windows 10 build culture issues

More
8 years 2 months ago - 8 years 2 months ago #1818 by Brian-ALLCAPS
Hello Inter Illusion

I am having issues with the plugin and building for universal 10. I am getting the following errors
Assets\I2\Localization\Scripts\LocalizationManager.cs(116,55): error CS1061: 'Thread' does not contain a definition for 'CurrentCulture' and no extension method 'CurrentCulture' accepting a first argument of type 'Thread' could be found (are you missing a using directive or an assembly reference?)
Assets\I2\Localization\Scripts\LocalizationManager.cs(126,57): error CS0117: 'CultureInfo' does not contain a definition for 'CreateSpecificCulture'

From reading the some of the updates it seems like the plugin should work, but for some reason it doesn't.

Can anybody help me out?

-Brian
Last edit: 8 years 2 months ago by Brian-ALLCAPS.

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

More
8 years 2 months ago - 8 years 2 months ago #1819 by Frank
Hi,
This was fixed in 2.6.8f4. I sent that version to the AssetStore, but its still in-review.

Nonetheless, you can download 2.6.8f4 from the beta folder and it includes the fix.

Another quick fix is to disable that change locally for WSA:

Assets\I2\Localization\Scripts\LocalizationManager.cs line 108 (replace SetLanguageAndCode and GetCulture functions by this ones:)
		public static void SetLanguageAndCode( string LanguageName, string LanguageCode, bool RememberLanguage = true, bool Force = false )
		{
			if (mCurrentLanguage != LanguageName || mLanguageCode != LanguageCode || Force)
			{
				if (RememberLanguage)
					PlayerPrefs.SetString ("I2 Language", LanguageName);
				mCurrentLanguage = LanguageName;
				mLanguageCode = LanguageCode;
              		        #if NETFX_CORE
            		              IsRight2Left = IsRTL (mLanguageCode);
            		        #else
            		             System.Threading.Thread.CurrentThread.CurrentCulture = GetCulture(LanguageCode);
           		             IsRight2Left = CultureInfo.CurrentCulture.TextInfo.IsRightToLeft;  //IsRTL (mLanguageCode);
         		        #endif
        		        LocalizeAll(Force);
			}
		}

        static CultureInfo GetCulture( string code )
        {
            #if !NETFX_CORE
                try
                {
                    return System.Globalization.CultureInfo.CreateSpecificCulture(code);
                }
                catch(System.Exception)
                {
                    return CultureInfo.InvariantCulture;
                }
            #else
                return CultureInfo.InvariantCulture;
            #endif
        }

Hope that helps,
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
Last edit: 8 years 2 months ago by Frank.

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

More
8 years 2 months ago #1828 by Brian-ALLCAPS
Hi Frank and thank you for the quick reply.

I will send you the I2L invoice so I can access the beta version.

Kind Regards
Brian

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

Time to create page: 0.139 seconds
Template by JoomlaShine