summaryrefslogtreecommitdiff
path: root/src/OSD/OSD_Localizer.cxx
blob: 91bc875ed4b9ec3cde76c85f26fc58e715c5e7db (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
// File     : OSD_Localizer.cdl
// Created  : 27 August 2010
// Author   : Paul SUPRYATKIN
// Copyright: Open CASCADE 2010

#include <OSD_Localizer.hxx>
#include <Standard.hxx>
#include <locale.h>

OSD_Localizer::OSD_Localizer(const Standard_Integer Category,const Standard_CString Locale )
{
  SetLocale( Category, Locale );
}


void OSD_Localizer::Restore()
{
  setlocale( myCategory, myLocale );
}


void OSD_Localizer::SetLocale(const Standard_Integer Category,const Standard_CString Locale )
{
  myLocale = setlocale( Category, 0 );
  myCategory = Category;
  setlocale( Category, Locale );
}

Standard_CString OSD_Localizer::Locale() const
{
  return myLocale;
}

Standard_Integer OSD_Localizer::Category() const
{
  return myCategory;
}