71 Posts
Dgikar
5 years ago
9
Topic

Hello

I indicated the following:

Typography Date - Time Ago there are only 2 language files: en-GB.com_cck_default.ini and fr-FR.com_cck_default.ini ... If I make an overdraft into Russian and / or Ukrainian languages or translate English en-GB.com_cck_default.ini into Russian and / or Ukrainian languages, then the publication date on the site is displayed like this ...

In English - no problems... Please tell me how to fix it?

Thank you in advance for the answers!

Get a Book for SEBLOD
4229 Posts
Kadministrator
5 years ago
8
Level 1

Hi,

to display all characters correctly you need to use  UTF-8 encoding at all places - in your language files, on your site, in your webserver and in your database. If your site is otherwise displaying characters correctly the problem is most likely in the encoding of the language file.

71 Posts
Dgikar
5 years ago
7
Level 2

Hi Klas! 

Thanks for the answer! But for me, everything you listed has UTF-8 (see screenshots):

  

+ with display of other language variables - no problem ... Only with the date output ...

4229 Posts
Kadministrator
5 years ago
6
Level 3

Hi,

perhaps the problem is in strtolower function - try adding before the plugin class:

	use Joomla\String\StringHelper 

and replace all occurences of strtolower with StringHelper::strtolower

71 Posts
Dgikar
5 years ago
2
Level 4

Do not quite understand where this needs to be done ...? Here: libraries\joomla\string?

71 Posts
Dgikar
5 years ago
0
Level 5

Problem start when lang. variable is:

COM_CCK_TIMELEFT_SENTENCE=" %s назад"

That is, when %s appears in a variable, display problems begin ...

Although sometimes (very rarely), the language variable is displayed correctly ...

4229 Posts
Kadministrator
5 years ago
0
Level 5

You need to implement this change in plugins/cck_field_typo/date/date.php

71 Posts
Dgikar
5 years ago
2
Level 4

Yes. so worked! Thank!

Probably you need to somehow implement it in the next release, and then when you upgrade, everything will again be as before - with an error...

How to do it? What needs to be done to make changes to the next release?

----------------------------------

And one more question:

How to make sure that the correct meaning is displayed in the Russian and Ukrainian languages:

  • One minute (одна минутА)
  • Two minutes (две минутЫ)
  • Three minutes (три минутЫ)
  • Four minutes (четыре минутЫ)
  • Five minutes (пять минуТ)
  • ....
  • One hour (один чаС)
  • Two hours (два часА)
  • Three hours (три часА)
  • Four hours (четыре часА)
  • Five hours (пять часОВ)
  • ....

There are just two concepts in English: minutE and minutES, and in Russian - three: 

  • One minute (одна минутА)
  • Two minutes (две минутЫ)
  • Five minutes (пять минуТ)

as well as in English: houR and houRS, and in Russian - three: 

  • One hour (один чаС)
  • Two hours (два часА)
  • Five hours (пять часОВ)
4229 Posts
Kadministrator
5 years ago
1
Level 5

You can make a pull request on the github for this change, when it is accepted it will be in every release.

71 Posts
Dgikar
5 years ago
0
Level 6

Klas, thanks for answers!

But as it turned out, this issue was raised on 03/10/2016, but so far it has not been resolved ... Update date.php #278

Get a Book for SEBLOD