function getmonth(month)
	local months = { "Januar", "Februar", "März", "April", "Mai", "Juni", "July", "August", "September", "Oktober", "November", "Dezember" }
	return months[tonumber(month)]
end

function getdayofweek(dayofweek)
    local daysofweek = { "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag" }
	return daysofweek[tonumber(dayofweek)]
end

function GameListSubtitleSystemLink(Content)
	if Content.SystemLink == true then
		return "LiNK unterstuetzt"
	end

	return "LiNK nicht unterstuetzt"
end

function GameListSubtitleDeveloper(Content)
	return string.format("Entwickler:  %s", Content.Developer )
end

function GameListSubtitlePublisher(Content)
	return string.format("Verleger:  %s", Content.Publisher )
end

function GameListSubtitleDateAdded(Content)
	if Content.DateAdded.HighPart == 0 then
	   return string.format( "Hinzugefuegt:  Unbekannt" )
	end

	local month = getmonth( Content.DateAdded.Month )
	local dayofweek = getdayofweek( Content.DateAdded.DayOfWeek )

	return string.format("Hinzugefuegt:  dayofweek, month, %s, %s %d, %d", Content.DateAdded.Day, Content.DateAdded.Year )
end

function GameListSubtitleLastPlayed(Content)
	if Content.LastPlayed.HighPart == 0 then
	   return string.format( "Zuletzt gespielt:  Nie" )
	end

	local month = getmonth( Content.LastPlayed.Month )
	local dayofweek = getdayofweek( Content.LastPlayed.DayOfWeek )

	return string.format("Zuletzt gespielt:  dayofweek, month, %s, %s %d, %d", Content.LastPlayed.Day, Content.LastPlayed.Year )
end

function GameListSubtitleVirtualPath(Content)
	local value = "Getrennt"
	if Content.Root ~= "" then
		value = string.format("Pfad: %s%s\\", Content.VirtualRoot, Content.Directory )
	end
	return value
end

function GameListSubtitleContentPath(Content)
	local value = "Getrennt"
	if Content.Root ~= "" then
		value = string.format("Pfad: %s%s\\", Content.Root, Content.Directory )
	end
	return value
end

function GameListSubtitleTitleMediaId(Content)
	return string.format("Titel ID: %08X | Media ID: %08X", Content.TitleId, Content.MediaId)
end

function GameListSubtitleTitleMediaIdBase(Content)
	return string.format("Titel ID: %08X | Media ID: %08X | Base Version: %08X", Content.TitleId, Content.MediaId, Content.BaseVersion)
end

function GameListSubtitleTitleId(Content)
	return string.format("Titel ID: %08X", Content.TitleId)
end

function GameListSubtitleMediaId(Content)
	return string.format("Media ID: %08X", Content.MediaId)
end

function GameListSubtitleBaseVersion(Content)
	return string.format("Base Version: %08X", Content.BaseVersion)
end

function GameListSubtitleGenre(Content)
	return string.format("Genre: %s", Content.GenreStr )
end

function GameListSubtitleDiscInfo(Content)
   discNum = Content.DiscNum
   discCount = Content.DiscsInSet
   if discNum == 0 then
      discNum = 1
   end
   if discCount == 0 then
      discCount = 1
   end
   return string.format("Disc: %d von %d", discNum, discCount)
end

function GameListSubtitleDefault(Content)
	return ""
end

function GameListSubtitleAchievement(Content)
	local value = "Melde Dich an, um Auszeichnungen zu sehen..."
	local result = Profile.GetTitleAchievement( 0, Content.TitleId )
	if type(result) == "table" then
		return string.format("Auszeichnungen freigeschaltet:  %d von %d (%d von %dG)", result["earned_count"], result["max_count"], result["earned_score"], result["max_score"])
	end

	if result == -1 then
		return value
	end

	if result == 0 then 
		return "Keine Auszeichnungen gefunden"
	end
end