locutil.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // © 2016 and later: Unicode, Inc. and others.
  2. // License & terms of use: http://www.unicode.org/copyright.html
  3. /**
  4. *******************************************************************************
  5. * Copyright (C) 2002-2005, International Business Machines Corporation and *
  6. * others. All Rights Reserved. *
  7. *******************************************************************************
  8. *
  9. *******************************************************************************
  10. */
  11. #ifndef LOCUTIL_H
  12. #define LOCUTIL_H
  13. #include "unicode/utypes.h"
  14. #include "hash.h"
  15. #if !UCONFIG_NO_SERVICE || !UCONFIG_NO_TRANSLITERATION
  16. U_NAMESPACE_BEGIN
  17. // temporary utility functions, till I know where to find them
  18. // in header so tests can also access them
  19. class U_COMMON_API LocaleUtility {
  20. public:
  21. static UnicodeString& canonicalLocaleString(const UnicodeString* id, UnicodeString& result);
  22. static Locale& initLocaleFromName(const UnicodeString& id, Locale& result);
  23. static UnicodeString& initNameFromLocale(const Locale& locale, UnicodeString& result);
  24. static const Hashtable* getAvailableLocaleNames(const UnicodeString& bundleID);
  25. static UBool isFallbackOf(const UnicodeString& root, const UnicodeString& child);
  26. };
  27. U_NAMESPACE_END
  28. #endif
  29. #endif