31 lines
1.5 KiB
C++
31 lines
1.5 KiB
C++
////////////////////////////////////////////////////////////////////////////////
|
|
// (c) Copyright, Ubisoft Entertainment Inc. || Created by Harbour //
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
#pragma once
|
|
#include "ubiservices/core/configs/config.h"
|
|
#include "ubiservices/core/types/string.h"
|
|
|
|
namespace US_NS {;
|
|
|
|
/// @addindex LocalizationHelper
|
|
/// Provides an easy way to manage the player locale code setting preference.
|
|
// This is a struct because swig is not able to generate C# files for namespaces with static functions. Swig "flattens" namespaces.
|
|
struct US_DLL_API LocalizationHelper
|
|
{
|
|
/// Returns the locale code in the form language-country (e.g. en-CA, ja-JP).
|
|
///
|
|
/// @note This method returns the same value as \c LocalizationHelper::getPlatformLocaleCode
|
|
/// until \c LocalizationHelper::setLocaleCode is called to override the value.
|
|
/// @ps4 There is no such information for the console (per player profile info only).
|
|
/// @ps5 There is no such information for the console (per player profile info only).
|
|
/// \c UserClient::requestUserInfoConsole may be used to get the locale code and
|
|
/// then call \c LocalizationHelper::setLocaleCode method.
|
|
static String getLocaleCode();
|
|
|
|
/// Overrides the default locale code with the specified value.
|
|
/// @param code The instance new locale code (i.e. en-CA, en-US)
|
|
/// @note The value specified is taken as is (no validations).
|
|
static void setLocaleCode(const String& code);
|
|
};
|
|
|
|
};
|