|
@@ -14,6 +14,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Utilities
|
|
{ "zh-CN", ContainsChineseSymbols },
|
|
{ "zh-CN", ContainsChineseSymbols },
|
|
{ "zh-TW", ContainsChineseSymbols },
|
|
{ "zh-TW", ContainsChineseSymbols },
|
|
{ "ko", ContainsKoreanSymbols },
|
|
{ "ko", ContainsKoreanSymbols },
|
|
|
|
+ { "en", ContainsStandardLatinSymbols },
|
|
};
|
|
};
|
|
|
|
|
|
public static bool IsFromLanguageSupported( string code )
|
|
public static bool IsFromLanguageSupported( string code )
|
|
@@ -95,6 +96,19 @@ namespace XUnity.AutoTranslator.Plugin.Core.Utilities
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static bool ContainsStandardLatinSymbols( string text )
|
|
|
|
+ {
|
|
|
|
+ foreach( var c in text )
|
|
|
|
+ {
|
|
|
|
+ if( ( c >= '\u0041' && c <= '\u005a' )
|
|
|
|
+ || ( c >= '\u0061' && c <= '\u007a' ) )
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Decodes a text from a single-line serializable format.
|
|
/// Decodes a text from a single-line serializable format.
|
|
///
|
|
///
|