[Mahara-contributors] [Bug 1982702] Re: Date strings to be in correct language

2023-11-27 Thread Kristina Hoeppner
Done

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1982702

Title:
  Date strings to be in correct language

Status in Mahara:
  In Progress

Bug description:
  Display the dates in correct language

  If we have a multi tenancy site then the PHP language may not be set
  to the one a person is viewing the site with so that PHP created
  strings, like a date may be in wrong language, eg

  EN  24 July 2022, 08:37
  DE  24. July 2022, 08:37

  We can't use the PHP setlocale() function because it can cause issues
  on a multithreaded server

  Now that we are including PHP intl module by default we can use some
  of it's functions to get what we need,

  eg:

  $cl = current_language();
  // Remove the '.utf8' from the language
  $cl = preg_replace('/\.utf8$/','',$cl);
  $langobject = datefmt_create($cl, IntlDateFormatter::LONG, 
IntlDateFormatter::SHORT, null, null, 'dd.  , hh:HH');
  $langstring = datefmt_format($langobject, 1658651838);
  log_debug($langstring);

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1982702/+subscriptions


___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 1982702] Re: Date strings to be in correct language

2023-07-10 Thread Doris Tam
https://git.mahara.org/catalyst/mahara/-/issues/89

** Changed in: mahara
 Assignee: (unassigned) => Doris Tam (doristam)

** Changed in: mahara
   Status: Confirmed => In Progress

** Bug watch added: git.mahara.org/catalyst/mahara/-/issues #89
   https://git.mahara.org/catalyst/mahara/-/issues/89

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1982702

Title:
  Date strings to be in correct language

Status in Mahara:
  In Progress

Bug description:
  Display the dates in correct language

  If we have a multi tenancy site then the PHP language may not be set
  to the one a person is viewing the site with so that PHP created
  strings, like a date may be in wrong language, eg

  EN  24 July 2022, 08:37
  DE  24. July 2022, 08:37

  We can't use the PHP setlocale() function because it can cause issues
  on a multithreaded server

  Now that we are including PHP intl module by default we can use some
  of it's functions to get what we need,

  eg:

  $cl = current_language();
  // Remove the '.utf8' from the language
  $cl = preg_replace('/\.utf8$/','',$cl);
  $langobject = datefmt_create($cl, IntlDateFormatter::LONG, 
IntlDateFormatter::SHORT, null, null, 'dd.  , hh:HH');
  $langstring = datefmt_format($langobject, 1658651838);
  log_debug($langstring);

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1982702/+subscriptions


___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 1982702] Re: Date strings to be in correct language

2023-03-27 Thread Kristina Hoeppner
Way forward:

Find all the places where we use date and date-time strings ->
consolidate these to use formats allowed by ICU because we should keep
things consistent anyway and don't need lots of different date displays

** Changed in: mahara
Milestone: 23.04.0 => 24.04.0

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1982702

Title:
  Date strings to be in correct language

Status in Mahara:
  Confirmed

Bug description:
  Display the dates in correct language

  If we have a multi tenancy site then the PHP language may not be set
  to the one a person is viewing the site with so that PHP created
  strings, like a date may be in wrong language, eg

  EN  24 July 2022, 08:37
  DE  24. July 2022, 08:37

  We can't use the PHP setlocale() function because it can cause issues
  on a multithreaded server

  Now that we are including PHP intl module by default we can use some
  of it's functions to get what we need,

  eg:

  $cl = current_language();
  // Remove the '.utf8' from the language
  $cl = preg_replace('/\.utf8$/','',$cl);
  $langobject = datefmt_create($cl, IntlDateFormatter::LONG, 
IntlDateFormatter::SHORT, null, null, 'dd.  , hh:HH');
  $langstring = datefmt_format($langobject, 1658651838);
  log_debug($langstring);

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1982702/+subscriptions


___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 1982702] Re: Date strings to be in correct language

2022-09-27 Thread Kristina Hoeppner
** Changed in: mahara
Milestone: 22.10.0 => 23.04.0

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1982702

Title:
  Date strings to be in correct language

Status in Mahara:
  Confirmed

Bug description:
  Display the dates in correct language

  If we have a multi tenancy site then the PHP language may not be set
  to the one a person is viewing the site with so that PHP created
  strings, like a date may be in wrong language, eg

  EN  24 July 2022, 08:37
  DE  24. July 2022, 08:37

  We can't use the PHP setlocale() function because it can cause issues
  on a multithreaded server

  Now that we are including PHP intl module by default we can use some
  of it's functions to get what we need,

  eg:

  $cl = current_language();
  // Remove the '.utf8' from the language
  $cl = preg_replace('/\.utf8$/','',$cl);
  $langobject = datefmt_create($cl, IntlDateFormatter::LONG, 
IntlDateFormatter::SHORT, null, null, 'dd.  , hh:HH');
  $langstring = datefmt_format($langobject, 1658651838);
  log_debug($langstring);

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1982702/+subscriptions


___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 1982702] Re: Date strings to be in correct language

2022-09-04 Thread Robert Lyon
We will need to create language string that follow the ICU date formats
https://unicode-org.github.io/icu/userguide/format_parse/datetime/

They don't seem to have as many options that DateTime does but they do
translate months / day words correctly

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1982702

Title:
  Date strings to be in correct language

Status in Mahara:
  Confirmed

Bug description:
  Display the dates in correct language

  If we have a multi tenancy site then the PHP language may not be set
  to the one a person is viewing the site with so that PHP created
  strings, like a date may be in wrong language, eg

  EN  24 July 2022, 08:37
  DE  24. July 2022, 08:37

  We can't use the PHP setlocale() function because it can cause issues
  on a multithreaded server

  Now that we are including PHP intl module by default we can use some
  of it's functions to get what we need,

  eg:

  $cl = current_language();
  // Remove the '.utf8' from the language
  $cl = preg_replace('/\.utf8$/','',$cl);
  $langobject = datefmt_create($cl, IntlDateFormatter::LONG, 
IntlDateFormatter::SHORT, null, null, 'dd.  , hh:HH');
  $langstring = datefmt_format($langobject, 1658651838);
  log_debug($langstring);

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1982702/+subscriptions


___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 1982702] Re: Date strings to be in correct language

2022-09-04 Thread Robert Lyon
** Description changed:

  Display the dates in correct language
  
  If we have a multi tenancy site then the PHP language may not be set to
  the one a person is viewing the site with so that PHP created strings,
  like a date may be in wrong language, eg
  
  EN  24 July 2022, 08:37
  DE  24. July 2022, 08:37
  
  We can't use the PHP setlocale() function because it can cause issues on
  a multithreaded server
  
  Now that we are including PHP intl module by default we can use some of
  it's functions to get what we need,
  
  eg:
  
  $cl = current_language();
  // Remove the '.utf8' from the language
  $cl = preg_replace('/\.utf8$/','',$cl);
- $langobject = $te($cl, IntlDateFormatter::LONG, IntlDateFormatter::SHORT, 
null, null, 'dd.  , hh:HH');
+ $langobject = datefmt_create($cl, IntlDateFormatter::LONG, 
IntlDateFormatter::SHORT, null, null, 'dd.  , hh:HH');
  $langstring = datefmt_format($langobject, 1658651838);
  log_debug($langstring);

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1982702

Title:
  Date strings to be in correct language

Status in Mahara:
  Confirmed

Bug description:
  Display the dates in correct language

  If we have a multi tenancy site then the PHP language may not be set
  to the one a person is viewing the site with so that PHP created
  strings, like a date may be in wrong language, eg

  EN  24 July 2022, 08:37
  DE  24. July 2022, 08:37

  We can't use the PHP setlocale() function because it can cause issues
  on a multithreaded server

  Now that we are including PHP intl module by default we can use some
  of it's functions to get what we need,

  eg:

  $cl = current_language();
  // Remove the '.utf8' from the language
  $cl = preg_replace('/\.utf8$/','',$cl);
  $langobject = datefmt_create($cl, IntlDateFormatter::LONG, 
IntlDateFormatter::SHORT, null, null, 'dd.  , hh:HH');
  $langstring = datefmt_format($langobject, 1658651838);
  log_debug($langstring);

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1982702/+subscriptions


___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 1982702] Re: Date strings to be in correct language

2022-08-14 Thread Kristina Hoeppner
** Tags added: bite-sized

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1982702

Title:
  Date strings to be in correct language

Status in Mahara:
  Confirmed

Bug description:
  Display the dates in correct language

  If we have a multi tenancy site then the PHP language may not be set
  to the one a person is viewing the site with so that PHP created
  strings, like a date may be in wrong language, eg

  EN  24 July 2022, 08:37
  DE  24. July 2022, 08:37

  We can't use the PHP setlocale() function because it can cause issues
  on a multithreaded server

  Now that we are including PHP intl module by default we can use some
  of it's functions to get what we need,

  eg:

  $cl = current_language();
  // Remove the '.utf8' from the language
  $cl = preg_replace('/\.utf8$/','',$cl);
  $langobject = $te($cl, IntlDateFormatter::LONG, IntlDateFormatter::SHORT, 
null, null, 'dd.  , hh:HH');
  $langstring = datefmt_format($langobject, 1658651838);
  log_debug($langstring);

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1982702/+subscriptions


___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp


[Mahara-contributors] [Bug 1982702] Re: Date strings to be in correct language

2022-07-24 Thread Robert Lyon
** Description changed:

  Display the dates in correct language
  
  If we have a multi tenancy site then the PHP language may not be set to
  the one a person is viewing the site with so that PHP created strings,
  like a date may be in wrong language, eg
  
  EN  24 July 2022, 08:37
  DE  24. July 2022, 08:37
  
- 
- We can't use the PHP setlocale() function because it can cause issues on a 
multithreaded server
+ We can't use the PHP setlocale() function because it can cause issues on
+ a multithreaded server
  
  Now that we are including PHP intl module by default we can use some of
  it's functions to get what we need,
  
  eg:
  
- $cl = current_language();
- // Remove the '.utf8' from the language
- $cl = preg_replace('/\.utf8$/','',$cl);
- $langobject = datefmt_create($cl, IntlDateFormatter::LONG, 
IntlDateFormatter::SHORT);
- $langstring = datefmt_format($langobject, 1658651838);
- log_debug($langstring);
+ $cl = current_language();
+ // Remove the '.utf8' from the language
+ $cl = preg_replace('/\.utf8$/','',$cl);
+ $langobject = $te($cl, IntlDateFormatter::LONG, IntlDateFormatter::SHORT, 
null, null, 'dd.  , hh:HH');
+ $langstring = datefmt_format($langobject, 1658651838);
+ log_debug($langstring);

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1982702

Title:
  Date strings to be in correct language

Status in Mahara:
  Confirmed

Bug description:
  Display the dates in correct language

  If we have a multi tenancy site then the PHP language may not be set
  to the one a person is viewing the site with so that PHP created
  strings, like a date may be in wrong language, eg

  EN  24 July 2022, 08:37
  DE  24. July 2022, 08:37

  We can't use the PHP setlocale() function because it can cause issues
  on a multithreaded server

  Now that we are including PHP intl module by default we can use some
  of it's functions to get what we need,

  eg:

  $cl = current_language();
  // Remove the '.utf8' from the language
  $cl = preg_replace('/\.utf8$/','',$cl);
  $langobject = $te($cl, IntlDateFormatter::LONG, IntlDateFormatter::SHORT, 
null, null, 'dd.  , hh:HH');
  $langstring = datefmt_format($langobject, 1658651838);
  log_debug($langstring);

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1982702/+subscriptions


___
Mailing list: https://launchpad.net/~mahara-contributors
Post to : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp