Hi, when i want to implement multi-language support i basically go to google translate what i learned you can implement google translate but it is paid now so is there any alternative. I think i will use this GitHub - LibreTranslate/LibreTranslate: Free and Open Source Machine Translation API. Self-hosted, offline capable and easy to setup. that was paid too i guess keep using google translator
I wasted about 3 hour trying making this, i tried structs , a class assigned to a static class etc.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class local : MonoBehaviour
{
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public static string damage()
{
string word=null ;
switch (SetData.language)
{
case "English":
word = "damage";
break;
case "Turkish":
word = "hasar";
break;
case "Japanese":
word = "ダメージ";
break;
case "Chinese":
word = "损害";
break;
case "Russian":
word = "повреждать";
break;
case "German":
word = "Schaden";
break;
case "Portugese":
word = "dano";
break;
}
return word;
}
public static string pierce()
{
string word = null;
switch (SetData.language)
{
case "English":
word = "";
break;
case "Turkish":
word = "delme";
break;
case "Japanese":
word = "ピアス";
break;
case "Chinese":
word = "刺穿";
break;
case "Russian":
word = "пронзить";
break;
case "German":
word = "durchbohren";
break;
case "Portugese":
word = "perfurar";
break;
}
return word;
}
public static string bulletNumber()
{
string word = null;
switch (SetData.language)
{
case "English":
word = "bullet Number";
break;
case "Turkish":
word = "Mermi Sayisi";
break;
case "Japanese":
word = "弾丸番号";
break;
case "Chinese":
word = "项目符号编号";
break;
case "Russian":
word = "номер пули";
break;
case "German":
word = "patrone nummer";
break;
case "Portugese":
word = "número de bala";
break;
}
return word;
}
public static string area()
{
string word = null;
switch (SetData.language)
{
case "English":
word = "area";
break;
case "Turkish":
word = "Alan";
break;
case "Japanese":
word = "エリア";
break;
case "Chinese":
word = "区域";
break;
case "Russian":
word = "область";
break;
case "German":
word = "Bereich";
break;
case "Portugese":
word = "área";
break;
}
return word;
}
public static string coolDown()
{
string word = null;
switch (SetData.language)
{
case "English":
word = "Cool Down";
break;
case "Turkish":
word = "Bekleme suresi";
break;
case "Japanese":
word = "クールダウン";
break;
case "Chinese":
word = "冷却";
break;
case "Russian":
word = "остывать";
break;
case "German":
word = "abkühlen";
break;
case "Portugese":
word = "esfriar";
break;
}
return word;
}
public static string health()
{
string word = null;
switch (SetData.language)
{
case "English":
word = "health";
break;
case "Turkish":
word = "can";
break;
case "Japanese":
word = "健康";
break;
case "Chinese":
word = "健康";
break;
case "Russian":
word = "здоровье";
break;
case "German":
word = "Gesundheit";
break;
case "Portugese":
word = "saúde";
break;
}
return word;
}
public static string criticalDamage()
{
string word = null;
switch (SetData.language)
{
case "English":
word = "Critical Damage";
break;
case "Turkish":
word = "Kritik Hasar";
break;
case "Japanese":
word = "致命傷";
break;
case "Chinese":
word = "暴击伤害";
break;
case "Russian":
word = "Критическое повреждение";
break;
case "German":
word = "kritischer Schaden";
break;
case "Portugese":
word = "Dano crítico";
break;
}
return word;
}
public static string criticalChance()
{
string word = null;
switch (SetData.language)
{
case "English":
word = "Critical Chance";
break;
case "Turkish":
word = "Kritik ihtimali";
break;
case "Japanese":
word = "クリティカルチャンス";
break;
case "Chinese":
word = "关键机会";
break;
case "Russian":
word = "Критический шанс";
break;
case "German":
word = "kritische Chance";
break;
case "Portugese":
word = "Chance crítica";
break;
}
return word;
}
public static string speed()
{
string word = null;
switch (SetData.language)
{
case "English":
word = "speed";
break;
case "Turkish":
word = "hiz";
break;
case "Japanese":
word = "スピード";
break;
case "Chinese":
word = "速度";
break;
case "Russian":
word = "скорость";
break;
case "German":
word = "Geschwindigkeit";
break;
case "Portugese":
word = "velocidade";
break;
}
return word;
}
}