hyperformula icon indicating copy to clipboard operation
hyperformula copied to clipboard

Improve i18n/locale docs for the US clients

Open sequba opened this issue 3 years ago • 2 comments

Description

  • create Internationalization Overview guide that describes setting up the language and all the i18n-related configuration options (including decimalSeparator, functionArgSeparator) - add examples for the US locale
  • add info to the Introduction page that we do support internationalization (with link to the Internationalization Overview)
  • rename (or alias) default language from enGB to enUS (don't change the translations)
  • use enUS date, currency & number formats in all the examples in the docs
  • change Chineese example to US in date and time handling guide
  • add a "notice" on top of the guide that the default date format is en-gb (number, currency?)
  • fix error in date and time handling guide - mentioned wrong default format: image
  • make sure there is no more error in this guide

Links

  • https://handsontable.github.io/hyperformula/guide/date-and-time-handling.html
  • #912
  • https://handsoncode.slack.com/archives/C031GBX62SE/p1659007424918559 (internal discussion)
  • Related: #535

Type of issue

  • [ ] Missing documentation
  • [x] Error in the documentation
  • [ ] Request for a demo
  • [ ] Request for a tutorial, guide etc.
  • [ ] Other issues, suggestions or ideas

sequba avatar Jul 07 '22 12:07 sequba

change Chineese example to US in date and time handling guide

This example should include US am/pm time formatting. It is supported by HyperFormula (I can see it in the test suite) but not demonstrated in the docs.

warpech avatar Jul 07 '22 15:07 warpech

Config params that should be covered by the Internationalization overview page:

  • language
  • functionArgSeparator, decimalSeparator, thousandSeparator
  • accentSensitive, localeLang (in the context of string comparison)
  • dateFormats, timeFormats, parseDateTime, stringifyDateTime, stringifyDuration (date/time format)
  • currencySymbol

sequba avatar Aug 18 '22 11:08 sequba

To achieve US locale compatibility:

  • language: 'enUS' (add this language and make sure there are no differences in function names between 'enGB' and 'enUS')
  • dateFormats: ['MM/DD/YYYY', 'MM/DD/YY']
  • make sure timeFormats: ['hh:mm', 'hh:mm:ss.sss'] accepts AM/PM notation, add this information to the API reference
  • decimalSeparator cannot be set to , because it must be different than functionArgSeparator (what about coercing strings to numbers?)
  • localeLang: 'en-US' (make sure it works)

From: https://handsoncode.slack.com/archives/C031GBX62SE/p1658139775643749?thread_ts=1657905045.235899&cid=C031GBX62SE (internal discussion)

sequba avatar Oct 18 '22 12:10 sequba

Closing as released in HyperFormula 2.2.0

sequba avatar Nov 17 '22 12:11 sequba