2021-06-27 21:25:29 +00:00
/***
Copyright ( C ) 2021 J Reece Wilson ( a / k / a " Reece " ) . All rights reserved .
File : Locale . hpp
Date : 2021 - 6 - 9
Author : Reece
* * */
# pragma once
2021-09-06 10:58:08 +00:00
# include "ECodePage.hpp"
# include "Encoding/Encoding.hpp"
2022-01-24 18:37:06 +00:00
# include "LocaleStrings.hpp"
2021-09-06 10:58:08 +00:00
2021-06-27 21:25:29 +00:00
namespace Aurora : : Locale
{
struct LocalizationInfo
{
2022-06-03 21:25:57 +00:00
inline LocalizationInfo ( ) { } ;
inline LocalizationInfo ( const LocalizationInfo & ) = default ;
inline LocalizationInfo ( LocalizationInfo & & ) = default ;
inline LocalizationInfo ( const AuString & language , const AuString & country , const AuString & codeset , const ECodePage codePage ) : language ( & language ) , country ( & country ) , codeset ( & codeset ) , codepage ( codePage ) { }
2021-06-27 21:25:29 +00:00
2022-06-03 21:25:57 +00:00
const AuString * language { } ; /// ISO 639
const AuString * country { } ; /// ISO 3166
const AuString * codeset { } ; ///
const ECodePage codepage { } ; /// Potentially eSysUnk. Note that eSysUnk is valid and handlable by iconv and nsl. On windows and unix, this is your codepage.
2021-06-27 21:25:29 +00:00
} ;
/*
Retrieves information about the current system < br >
This function will never fail < br >
This function will never release memory
*/
AUKN_SYM LocalizationInfo GetLocale ( ) ;
# if defined(AURORA_PLATFORM_WIN32) || defined(I_REALLY_NEED_WIDECHAR_PUBAPI)
AUKN_SYM std : : wstring ConvertFromUTF8 ( const AuString & in ) ;
AUKN_SYM AuString ConvertFromWChar ( const wchar_t * in , AuMach length ) ;
AUKN_SYM AuString ConvertFromWChar ( const wchar_t * in ) ;
# endif
}