コード例 #1
0
ファイル: XLRLocalizer.cs プロジェクト: heon21st/flashdevelop
		public virtual XLRTargetNode checkLocales(System.Globalization.CultureInfo locale, System.String id)
		{
			XLRTargetNode t = checkPrefix(locale, id, locale, id);
			
			//UPGRADE_ISSUE: Method 'java.util.Locale.getVariant' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javautilLocalegetVariant'"
			if ((t == null) && (new System.Globalization.RegionInfo(locale.LCID).TwoLetterISORegionName.Length > 0) && (locale.getVariant().Length > 0))
			{
				//UPGRADE_WARNING: Constructor 'java.util.Locale.Locale' was converted to 'System.Globalization.CultureInfo' which may throw an exception. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1101'"
				//UPGRADE_TODO: Method 'java.util.Locale.getLanguage' was converted to 'System.Globalization.CultureInfo.TwoLetterISOLanguageName' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilLocalegetLanguage'"
				t = checkPrefix(new System.Globalization.CultureInfo(locale.TwoLetterISOLanguageName + "-" + new System.Globalization.RegionInfo(locale.LCID).TwoLetterISORegionName), id, locale, id);
			}
			
			if ((t == null) && (new System.Globalization.RegionInfo(locale.LCID).TwoLetterISORegionName.Length > 0))
			{
				//UPGRADE_TODO: Method 'java.util.Locale.getLanguage' was converted to 'System.Globalization.CultureInfo.TwoLetterISOLanguageName' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilLocalegetLanguage'"
				t = checkPrefix(new Locale(locale.TwoLetterISOLanguageName), id, locale, id);
			}
			
			if ((t == null))
				t = checkPrefix(null, id, locale, id);
			
			return t;
		}
コード例 #2
0
ファイル: XLRLocalizer.cs プロジェクト: heon21st/flashdevelop
		private System.String getKey(System.Globalization.CultureInfo locale, System.String id)
		{
			System.String key = id;
			if (locale != null)
			{
				//UPGRADE_TODO: Method 'java.util.Locale.getLanguage' was converted to 'System.Globalization.CultureInfo.TwoLetterISOLanguageName' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilLocalegetLanguage'"
				if (locale.TwoLetterISOLanguageName.Length > 0)
				{
					//UPGRADE_TODO: Method 'java.util.Locale.getLanguage' was converted to 'System.Globalization.CultureInfo.TwoLetterISOLanguageName' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilLocalegetLanguage'"
					key += ("_" + locale.TwoLetterISOLanguageName);
					if (new System.Globalization.RegionInfo(locale.LCID).TwoLetterISORegionName.Length > 0)
					{
						key += ("_" + new System.Globalization.RegionInfo(locale.LCID).TwoLetterISORegionName);
						
						//UPGRADE_ISSUE: Method 'java.util.Locale.getVariant' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javautilLocalegetVariant'"
						if (locale.getVariant().Length > 0)
						{
							//UPGRADE_ISSUE: Method 'java.util.Locale.getVariant' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javautilLocalegetVariant'"
							key += ("_" + locale.getVariant());
						}
					}
				}
			}
			return key;
		}