docs.unity3d.com
    目次を表示する/隠す

    Class SystemLocaleSelector

    Attempts to detect the locale of the device and find a match. The System Locale Selector queries different APIs until it finds a matching locale or a suitable fallback locale. The System Locale Selector queries different APIs until it finds a locale or a suitable fallback locale.

    • iOS - Preferred Language. Unity queries the iOS Preferred Language.
    • Android - Device Language. Unity queries the Android getDefault value.
    • System Culture. Unity uses the CultureInfo.CurrentUICulture value.
    • System Language. Unity uses the SystemLanguage value as its final check.

    Inheritance
    Object
    SystemLocaleSelector
    Namespace: UnityEngine.Localization.Settings
    Syntax
    [Serializable]
    public class SystemLocaleSelector : IStartupLocaleSelector

    Methods

    GetApplicationSystemLanguage()

    Returns Application.systemLanguage.

    Declaration
    protected virtual SystemLanguage GetApplicationSystemLanguage()
    Returns
    Type Description
    SystemLanguage

    GetStartupLocale(ILocalesProvider)

    Uses CultureInfo.CurrentUICulture and Application.systemLanguage to find a matching Locale from the available locales.

    Declaration
    public Locale GetStartupLocale(ILocalesProvider availableLocales)
    Parameters
    Type Name Description
    ILocalesProvider availableLocales
    Returns
    Type Description
    Locale
    Implements
    IStartupLocaleSelector.GetStartupLocale(ILocalesProvider)

    GetSystemCulture()

    Returns CultureInfo.CurrentUICulture.

    Declaration
    protected virtual CultureInfo GetSystemCulture()
    Returns
    Type Description
    CultureInfo
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)