Logo
Locale.h
1#pragma once
2
3#include "base/Locale.h"
4
5namespace SharpKmyBase
6{
7 public ref class Locale
8 {
9 public:
10 static void setJapanese(bool flg)
11 {
12 kmyBase::Locale::setDebugLanguageId(
13 flg ? kmyBase::Locale::kLANGUAGEID_JA : kmyBase::Locale::kLANGUAGEID_EN_US);
14 }
15 static void setLocale(System::String^ locale)
16 {
17 if (locale != nullptr)
18 {
19 auto l = SharpKmyBase::StringConv::convert(locale);
20 kmyBase::CharArrayRange lang(l.c_str());
21 kmyBase::Locale::LANGUAGEID id = kmyBase::Locale::getLanguageId(lang);
22 if (id == kmyBase::Locale::kLANGUAGEID_UNDEFINED)
23 id = kmyBase::Locale::kLANGUAGEID_EN_US;
24 kmyBase::Locale::setDebugLanguageId(id);
25 }
26 }
27 };
28}
Definition: Locale.h:8
static void setJapanese(bool flg)
Definition: Locale.h:10
static void setLocale(System::String^ locale)
Definition: Locale.h:15
static std::string convert(System::String^ s)
Definition: SharpKmyCore.cpp:36
Definition: Asset.cpp:6