유니티 C# 시스템 언어 가져오기 System Language 간단 사용법

반응형

유니티 C# 시스템 언어 가져오기 System Language 간단 사용법

코드 작성

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        if (Application.systemLanguage == SystemLanguage.English)
        {
            Debug.Log("영어");
        }
        else if (Application.systemLanguage == SystemLanguage.Korean)
        {
            Debug.Log("한국어");
        }
        else if (Application.systemLanguage == SystemLanguage.Japanese)
        {
            Debug.Log("일본어");
        }
        else if (Application.systemLanguage == SystemLanguage.Chinese)
        {
            Debug.Log("중국어");
        }
        else if (Application.systemLanguage == SystemLanguage.Portuguese)
        {
            Debug.Log("포루투갈어");
        }
        else if (Application.systemLanguage == SystemLanguage.Russian)
        {
            Debug.Log("러시아어");
        }
        else if (Application.systemLanguage == SystemLanguage.German)
        {
            Debug.Log("독일어");
        }
        else if (Application.systemLanguage == SystemLanguage.Spanish)
        {
            Debug.Log("스페인어");
        }
        else if (Application.systemLanguage == SystemLanguage.Arabic)
        {
            Debug.Log("아랍어");
        }
        else
        {
            Debug.Log("언어가 없습니다");
        }
    }
}

 


참고 문서

 

Unity - Scripting API: SystemLanguage

Success! Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable. Close

docs.unity3d.com

 

반응형