// Copyright (c) Wojciech Figat. All rights reserved. #pragma once #include "Engine/Core/Types/String.h" #include "Engine/Core/Formatting.h" /// /// The information about a specific culture (aka locale). The information includes the names for the culture, the writing system, the calendar used, the sort order of strings, and formatting for dates and numbers. /// API_CLASS(InBuild, Namespace="System.Globalization") class FLAXENGINE_API CultureInfo { DECLARE_SCRIPTING_TYPE_MINIMAL(CultureInfo); private: void* _data; int32 _lcid; int32 _lcidParent; String _name; String _nativeName; String _englishName; public: /// /// Initializes a new instance of the class. /// /// The culture identifier. CultureInfo(int32 lcid); /// /// Initializes a new instance of the class. /// /// The culture name (eg. pl-PL). CultureInfo(const StringView& name); /// /// Initializes a new instance of the class. /// /// The culture name (eg. pl-PL). CultureInfo(const StringAnsiView& name); public: /// /// Gets the culture identifier. /// int32 GetLCID() const; /// /// Gets the parent culture identifier. /// int32 GetParentLCID() const; /// /// Gets the culture name (eg. pl-PL). /// const String& GetName() const; /// /// Gets the full localized culture name (eg. Polish (Poland)). /// const String& GetNativeName() const; /// /// Gets the culture name in English (eg. polski (Polska)). /// const String& GetEnglishName() const; String ToString() const; bool operator==(const CultureInfo& other) const; }; DEFINE_DEFAULT_FORMATTING_VIA_TO_STRING(CultureInfo); namespace MUtils { extern void* ToManaged(const CultureInfo& value); extern CultureInfo ToNative(void* value); }