27 lines
607 B
C#
27 lines
607 B
C#
using UGQDatabase.Models;
|
|
|
|
namespace UGQApiServer.Converter;
|
|
|
|
public static class ConverterCommon
|
|
{
|
|
public static List<string> buildLanguages(TextEntity titleText)
|
|
{
|
|
List<string> languages = new List<string>();
|
|
|
|
if (string.IsNullOrEmpty(titleText.En) == false)
|
|
languages.Add("en");
|
|
|
|
if (string.IsNullOrEmpty(titleText.Kr) == false)
|
|
languages.Add("kr");
|
|
|
|
if (string.IsNullOrEmpty(titleText.Jp) == false)
|
|
languages.Add("jp");
|
|
|
|
if (languages.Count == 0)
|
|
languages.Add("en");
|
|
|
|
return languages;
|
|
}
|
|
|
|
}
|