wasm.locale.api.pas 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2025 by the Free Pascal development team.
  4. WASM API calls for internationalization/localization.
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. unit wasm.locale.api;
  12. interface
  13. uses
  14. {$IFDEF FPC_DOTTEDUNITS}
  15. System.Types,
  16. {$ELSE}
  17. types,
  18. {$ENDIF}
  19. wasm.locale.shared;
  20. function __locale_SetWasmLocale(aName: PAnsiChar; aNameLen: Longint): TLocaleError;
  21. external modHostLocale name HostLocale_FNSetWasmLocale;
  22. function __locale_GetNameOfDay(aDay: Integer;
  23. aLong: Integer;
  24. aName: PAnsiChar;
  25. aNameLen: PLongint): TLocaleError;
  26. external modHostLocale name HostLocale_FNGetNameOfDay;
  27. function __locale_GetNameOfMonth(aMonth: Integer;
  28. aLong: Integer;
  29. aName: PAnsiChar;
  30. aNameLen: PLongint): TLocaleError;
  31. external modHostLocale name HostLocale_FNGetNameOfMonth;
  32. function __locale_GetDateSeparator(aSeparator: PAnsiChar;
  33. aSeparatorLen: PLongint): TLocaleError;
  34. external modHostLocale name HostLocale_FNGetDateSeparator;
  35. function __locale_GetTimeSeparator(aSeparator: PAnsiChar;
  36. aSeparatorLen: PLongint): TLocaleError;
  37. external modHostLocale name HostLocale_FNGetTimeSeparator;
  38. function __locale_GetDecimalSeparator(aSeparator: PAnsiChar;
  39. aSeparatorLen: PLongint): TLocaleError;
  40. external modHostLocale name HostLocale_FNGetDecimalSeparator;
  41. function __locale_GetThousandSeparator(aSeparator: PAnsiChar;
  42. aSeparatorLen: PLongint): TLocaleError;
  43. external modHostLocale name HostLocale_FNGetThousandsSeparator;
  44. function __locale_GetCurrencySymbol(aSymbol: PAnsiChar;
  45. aSymbolLen: PLongint): TLocaleError;
  46. external modHostLocale name HostLocale_FNGetCurrencyChar;
  47. function __locale_GetTimeZoneOffset : Integer;
  48. external modHostLocale name HostLocale_FNGetTimezoneOffset;
  49. implementation
  50. end.