aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Xbox/Sentient/Include/SenClientCulture.h
blob: 8fb6b642d20fe2e83077348c32d502e76b74798e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/********************************************************
*                                                       *
* Copyright (C) Microsoft. All rights reserved.         *
*                                                       *
********************************************************/

// Sentient Client Culture API
//
// Include this to get access to all Culture-related Sentient features.

#pragma once
#include "SenClientTypes.h"

namespace Sentient
{
	//=========================//
	//                         //
	//    Culture Functions    //
	//                         //
	//=========================//

	/// @brief           Set the current culture to the one specified, if possible.
	///
	/// @param[in]       dwLanguage
    ///                  the DWORD id as defined in xconfig.h (e.g. XC_LANGUAGE_ENGLISH) for the language to use

    /// @param[in]       dwLocale
    ///                  the DWORD id as defined in xconfig.h (e.g. XC_LOCALE_GREAT_BRITAIN) for the region to use
	///
	/// @return          Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success.  Specific values include:
	///                  SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
	///                  E_FAIL: Failed to find the given culture.
	///                  S_OK: Current culture set successfully.
	///
	/// @details         Set the current culture to the one specified, if possible (if not english will be used).
    ///                  This should only be called during title launch if it is determined that the console is set to a lanuage unsupported by the title.
    ///                  This method should only be called once, right after calling SentientInitialize() 
	///                  This is the culture that will be used when any string routine is called.
	///                  By default, this is set to the system culture & region.
	///
    HRESULT SetCurrentCulture(
        __in DWORD dwLanguage,	
        __in DWORD dwLocale
        );

    /// @brief           Set the current culture to English (no region)
	///
	/// @return          Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success.  Specific values include:
	///                  SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
	///                  E_FAIL: Failed to find the given culture.
	///                  S_OK: Current culture set successfully.
	///
	/// @details         Set the current culture English.
    ///                  This should only be called during title launch if it is determined that the console is set to a lanuage unsupported by the title.
    ///                  This method should only be called once, right after calling SentientInitialize() 
	///                  This is the culture that will be used when any string routine is called.
	///                  By default, Sentient uses the console's culture & region.
	///
    __inline HRESULT SetCurrentCultureEnglish() { return SetCurrentCulture(XC_LANGUAGE_ENGLISH, 0); }

} // namespace Sentient