/// <summary>
        /// Creates a <see cref="LocalizedStringList"/> from a <see cref="FourthGenMultilingualStringList"/>.
        /// </summary>
        /// <param name="group">The string list to load from.</param>
        /// <param name="languageIndex">Index of the language.</param>
        /// <param name="table">The string table to load from.</param>
        /// <returns>The created string list.</returns>
        private static LocalizedStringList CreateList(FourthGenMultilingualStringList group, int languageIndex, List <LocalizedString> table)
        {
            var startIndex = group.Ranges[languageIndex].StartIndex;
            var size       = group.Ranges[languageIndex].Size;
            var strings    = table.Skip(startIndex).Take(size).ToList();

            return(new LocalizedStringList(group.Tag, strings));
        }
 /// <summary>
 /// Loads group info from a cache file.
 /// </summary>
 /// <param name="reader">The stream to read from.</param>
 /// <param name="cacheFile">The cache file.</param>
 private void LoadGroups(IReader reader, ICacheFile cacheFile)
 {
     foreach (var tag in cacheFile.Tags.FindTagsByClass("unic"))
     {
         var group = new FourthGenMultilingualStringList(reader, tag, _buildInfo);
         _groupsByTag[tag] = group;
     }
 }
        /// <summary>
        /// Merges a <see cref="LocalizedStringList"/> with string list information for a language.
        /// </summary>
        /// <param name="stringList">The string list.</param>
        /// <param name="languageIndex">Index of the language.</param>
        /// <param name="startIndex">The index where strings in the list will start at.</param>
        /// <returns>The number of strings in the string list.</returns>
        private int MergeStringList(LocalizedStringList stringList, int languageIndex, int startIndex)
        {
            // TODO: Assert that the tag exists
            FourthGenMultilingualStringList group;

            _groupsByTag.TryGetValue(stringList.SourceTag, out group);
            if (group == null)
            {
                // Create a new string list
                // Assume there's going to be at least one group already and use that to get the number of languages...
                // TODO: Read this from build info or something
                var ranges = _groupsByTag.Values.First().Ranges.Select(r => new StringRange(0, 0)).ToArray();
                group = new FourthGenMultilingualStringList(stringList.SourceTag, ranges, _buildInfo);
                _groupsByTag[stringList.SourceTag] = group;
            }
            group.Ranges[languageIndex].StartIndex = startIndex;
            group.Ranges[languageIndex].Size       = stringList.Strings.Count;
            return(stringList.Strings.Count);
        }
		/// <summary>
		/// Loads group info from a cache file.
		/// </summary>
		/// <param name="reader">The stream to read from.</param>
		/// <param name="cacheFile">The cache file.</param>
		private void LoadGroups(IReader reader, ICacheFile cacheFile)
		{
			foreach (var tag in cacheFile.Tags.FindTagsByClass("unic"))
			{
				var group = new FourthGenMultilingualStringList(reader, tag, _buildInfo);
				_groupsByTag[tag] = group;
			}
		}
		/// <summary>
		/// Creates a <see cref="LocalizedStringList"/> from a <see cref="FourthGenMultilingualStringList"/>.
		/// </summary>
		/// <param name="group">The string list to load from.</param>
		/// <param name="languageIndex">Index of the language.</param>
		/// <param name="table">The string table to load from.</param>
		/// <returns>The created string list.</returns>
		private static LocalizedStringList CreateList(FourthGenMultilingualStringList group, int languageIndex, List<LocalizedString> table)
		{
			var startIndex = group.Ranges[languageIndex].StartIndex;
			var size = group.Ranges[languageIndex].Size;
			var strings = table.Skip(startIndex).Take(size).ToList();
			return new LocalizedStringList(group.Tag, strings);
		}
		/// <summary>
		/// Merges a <see cref="LocalizedStringList"/> with string list information for a language.
		/// </summary>
		/// <param name="stringList">The string list.</param>
		/// <param name="languageIndex">Index of the language.</param>
		/// <param name="startIndex">The index where strings in the list will start at.</param>
		/// <returns>The number of strings in the string list.</returns>
		private int MergeStringList(LocalizedStringList stringList, int languageIndex, int startIndex)
		{
			// TODO: Assert that the tag exists
			FourthGenMultilingualStringList group;
			_groupsByTag.TryGetValue(stringList.SourceTag, out group);
			if (group == null)
			{
				// Create a new string list
				// Assume there's going to be at least one group already and use that to get the number of languages...
				// TODO: Read this from build info or something
				var ranges = _groupsByTag.Values.First().Ranges.Select(r => new StringRange(0, 0)).ToArray();
				group = new FourthGenMultilingualStringList(stringList.SourceTag, ranges, _buildInfo);
				_groupsByTag[stringList.SourceTag] = group;
			}
			group.Ranges[languageIndex].StartIndex = startIndex;
			group.Ranges[languageIndex].Size = stringList.Strings.Count;
			return stringList.Strings.Count;
		}