Unity.Platform.IPhone.IPhoneI18N.readAllFromPlistFile C# (CSharp) Method

readAllFromPlistFile() protected method

protected readAllFromPlistFile ( string file ) : ResourceLiteralDictionary
file string
return ResourceLiteralDictionary
		protected override ResourceLiteralDictionary readAllFromPlistFile (string file)
		{
			if(IPhoneUtils.GetInstance().ResourcesZipped) {
				// if resource is zipped, we will need to parse the file as an xml file (done in abstract class)
				return base.readAllFromPlistFile(file);
			} else {
				try
				{
					ResourceLiteralDictionary result = null;
					if (this.FileExists (file)) {
						result = new ResourceLiteralDictionary();
						NSDictionary literalDictionary = loadResourcesLiteral(file);
						foreach(NSObject key in literalDictionary.Keys)
						{
							result.Add(key.ToString(),literalDictionary[key].ToString());
						}
						return result;
					} else {
						// if file does not exists, means that requested locale is not supported by application
						// try then to get default locale string
						return this.GetResourceLiterals();
					}
				} catch(Exception ex) {
					#if DEBUG
					SystemLogger.Log(SystemLogger.Module.PLATFORM, "reading PLIST file (" + file + ")in iPhonei18N: Exception message:" + ex.Message);
					#endif
					return null;
				}
			}
		}