Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.9 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Copyright (C) Microsoft Corporation, 1996 - 1998.
  4. //
  5. // File: WEBLANG.HXX
  6. //
  7. // Contents: Language support
  8. //
  9. // Classes: CWebLangLocator
  10. //
  11. // History: 96-Feb-29 Dwightkr Created
  12. //
  13. //----------------------------------------------------------------------------
  14. #pragma once
  15. #include "isreg.hxx"
  16. //+---------------------------------------------------------------------------
  17. //
  18. // Class: CWebLangLocator
  19. //
  20. // Purpose: class to enumerating languages and get lang.error files.
  21. //
  22. // History: 96-Feb-29 DwightKr Created.
  23. //
  24. //----------------------------------------------------------------------------
  25. class CWebLangLocator
  26. {
  27. public:
  28. CWebLangLocator( LCID locale );
  29. BOOL LocaleFound() const { return _fLocaleFound || _fLangFound || _fSysLangFound; }
  30. WCHAR *GetIDQErrorFile() { return _wcsIDQErrorFile; }
  31. WCHAR *GetHTXErrorFile() { return _wcsHTXErrorFile; }
  32. WCHAR *GetRestrictionErrorFile() { return _wcsRestrictionErrorFile; }
  33. WCHAR *GetDefaultErrorFile() { return _wcsDefaultErrorFile; }
  34. private:
  35. void GetLangInfo(DWORD dwLocale, CWin32RegAccess & regLang);
  36. void EnumLangEntries(void);
  37. static BOOL PrimaryLangsMatch( LCID lcid1, LCID lcid2 )
  38. {
  39. //
  40. // Do the primary languages of the two lcids match ?
  41. //
  42. return( PRIMARYLANGID( LANGIDFROMLCID( lcid1 ) )
  43. == PRIMARYLANGID( LANGIDFROMLCID( lcid2 ) ) );
  44. }
  45. BOOL _fLocaleFound;
  46. BOOL _fLangFound;
  47. BOOL _fSysLangFound;
  48. LCID _locale;
  49. LCID _localeSys;
  50. WCHAR _wcsIDQErrorFile[_MAX_PATH];
  51. WCHAR _wcsHTXErrorFile[_MAX_PATH];
  52. WCHAR _wcsRestrictionErrorFile[_MAX_PATH];
  53. WCHAR _wcsDefaultErrorFile[_MAX_PATH];
  54. };