CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Problem with date fields in fr_CA language
Pages: [1]

Author Topic: Problem with date fields in fr_CA language  (Read 862 times)

Edsel Roque Lopez

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: 7.10
  • MySQL version: 5
  • PHP version: 5.3.6
Problem with date fields in fr_CA language
June 25, 2013, 05:23:12 am
The dates don't seem to display the French translation for the days/months when French is the default language used.

A sample contribution receipt reads

Date de réception    May 10th, 2013
Date du reçu    May 10th, 2013

The site was installed with French selected as the default language. Should I be doing anything else to ensure the dates get translated as well?

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: Problem with date fields in fr_CA language
September 11, 2013, 05:44:36 pm
Hi,

You can change the date format in: Administer > Localisation > Date formats.

I think it's the "Complete date/time", you can select a format such as: %Y-%m-%d %H:%M

This uses ISO8601 date formats, which is the official format for Canada and many other countries. It also avoids any language-specifics, such as "10th".

One limitation: localization settings are common between languages. That includes date formats, currency format and decimal/thousands separator.

Sorry for responding late! Hopefully it can be useful for other people finding this question via a search engine.

Mathieu
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: Problem with date fields in fr_CA language
September 12, 2013, 08:10:28 am
Is there a way to configure things so that a client that wants the name spelled out - mai - can get that? This is a unilingual ca_FR site.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: Problem with date fields in fr_CA language
September 12, 2013, 08:29:01 am
Hmm, on my sandbox, "%B" works for the full month name. I think the "fr_CA.utf8" locale needs  to be enabled server-wide ("locale -a" on the command line).

The date is formatted by crmDate in smarty, which calls CRM_Utils_Date::customFormat(), and this relies on strftime() to enerate month names. strftime() is depandant on setlocale, so the locale needs to be enabled by the system.
http://ca2.php.net/manual/en/function.strftime.php
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: Problem with date fields in fr_CA language
September 12, 2013, 09:08:14 am
Thanks, bgm!
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Problem with date fields in fr_CA language

This forum was archived on 2017-11-26.