/// <summary> /// Open a content /// </summary> public TranslationContent OpenContent(String file) { var tf = FindFile(file); if (tf == null) throw new ArgumentException(Locales.SR.Error_FileNotFoundInGroup); TranslationFile neutralFile = null; TranslationFile transFile = null; if (tf.IsNeutral) { neutralFile = tf; } else { neutralFile = Files.FirstOrDefault(f => f.IsNeutral); transFile = tf; } var result = new TranslationContent(this.Name, neutralFile, transFile); result.LoadContent(); return result; }
internal TranslationContentValue(TranslationContent content, TranslationFileValue neutral, TranslationFileValue translation) { this.Content = content; this.Neutral = neutral; this.Translation = translation; this.ReferenceGroup = this.Neutral.ReferenceGroup; this.ReferenceCode = this.Neutral.ReferenceCode; this.ReferenceKey = this.Neutral.ReferenceKey; this.Description = this.Neutral.Description; if (String.IsNullOrWhiteSpace(this.Description)) this.Description = this.Translation != null ? this.Translation.Description : String.Empty; this.NeutralValue = this.Neutral.Translation; }