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

readFromPlistFile() protected method

protected readFromPlistFile ( string file, string key ) : string
file string
key string
return string
		protected override string readFromPlistFile (string file, string key)
		{

			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.readFromPlistFile(file, key);
			} else {
				string result = string.Empty;
				if (this.FileExists (file)) {
					NSDictionary resourcesLiteral = loadResourcesLiteral (file);
					if (resourcesLiteral != null) {
						result = getResourceLiteralValue(key, file, resourcesLiteral);
					}
					result = (result ==  null || result == string.Empty) ? String.Format ("<{0}>", key) : 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.GetResourceLiteral(key);
				}
				return result;
			}
		}