Log in

View Full Version : Issue with languages and footer time.


MarkFL
12-21-2015, 01:45 AM
Hello vBorg.

One of our users (who uses vB 5.1.10) here came to me with an issue regarding the display of the current time in the footer. When English is chosen, the current time displays correctly, however, the date format string {vb:raw vboptions.timeformat} displays for all of the other languages instead.

Line 77 of the "footer" template reads:

<div id="footer-current-datetime">{vb:phrase footer_current_time, {vb:if user.timezoneoffset, {vb:raw user.timezoneoffset}}, {vb:date 'timenow', {vb:raw vboptions.timeformat}}}</div>

Now, when I go to the "Phrase Manager" to see what is in the phrase "footer_current_time," I find:

Text: All times are GMT{1}. This page was generated at {2}.

French: Fuseau horaire GMT {1}. Il est actuellement {2}.

German: Die Seite wurde um {2} erstellt.

Rom?nă: Această pagină a fost generată la {2}.

Spanish: Todas las horas son GMT {1}. Esta p?gina fue generada en {2}.

I notice also, that if I save the "footer" template when any language other than English is being used, I get the following warning:

Warning: preg_match(): Unknown modifier '2' in ../includes/adminfunctions_template.php on line 4765

Does anyone know what needs to be done to straighten out this problem?

In Omnibus
12-21-2015, 02:03 PM
It sounds like it might be an issue with the 12 hour vs. the 24 hour clock. Most European countries use a 24 hour clock. I believe the default clock setting is h:i A whereas the 24 hour setting is H:i

Is the user using the 12 hour setting or the 24 hour setting? Perhaps changing it in the Date and Time options will resolve the issue.

MarkFL
12-21-2015, 02:34 PM
It sounds like it might be an issue with the 12 hour vs. the 24 hour clock. Most European countries use a 24 hour clock. I believe the default clock setting is h:i A whereas the 24 hour setting is H:i

Is the user using the 12 hour setting or the 24 hour setting? Perhaps changing it in the Date and Time options will resolve the issue.

Yes, I did consider that and noted the user is using a 12 hour format, and so I tried a 24 hour format, but I then got "H:i" where the time should be instead of "h:i A".

Lynne
12-21-2015, 04:50 PM
See this Jira regarding the issue - http://tracker.vbulletin.com/browse/VBV-13952 (Note, you must first login to the vbulletin.com forums as a Licensed User before you may see the Jira issue.)

There is a temporary fix posted in there which I have not tried.

Find this in template footer:
{vb:phrase footer_current_time, {vb:if user.timezoneoffset, {vb:raw user.timezoneoffset}}, {vb:date 'timenow', {vb:raw vboptions.timeformat}}}
Change it to:

{vb:phrase footer_current_time, {vb:if user.timezoneoffset, {vb:raw user.timezoneoffset}}, {vb:datetime 'timenow', time}}

Hectorsky
12-21-2015, 05:00 PM
See this Jira regarding the issue - http://tracker.vbulletin.com/browse/VBV-13952 (Note, you must first login to the vbulletin.com forums as a Licensed User before you may see the Jira issue.)

There is a temporary fix posted in there which I have not tried.

There now is an other issue on What's going one widget ...

you can check by this link : http://forum.republicamd.com

That issue is for all languages except english one

--------------- Added 1450748061 at 1450748061 ---------------

up...

Lynne
12-22-2015, 05:17 PM
There is a Jira for that one too - http://tracker.vbulletin.com/browse/VBV-11687

Hectorsky
12-22-2015, 06:04 PM
There is a Jira for that one too - http://tracker.vbulletin.com/browse/VBV-11687

I found it but , there is a other issue , is showing currently time , but suppose to show when was the most users online

English language: Most users ever online was 81 at 01:00 AM on 01-01-1970.
French and others: Le record de connect?s est de 81, 22 d�cembre 2015 ? 21h03.

In both case is bug

--------------- Added 1450815162 at 1450815162 ---------------

I found hot to fix it , and is works fine .

Link : http://tracker.vbulletin.com/browse/VBV-13957

Thanks Lynne

--------------- Added 1450815304 at 1450815304 ---------------

Idk what's wrong .... after 2 minutes is showing me this

What's Going On
Collapse
There are currently 2 users online. 1 members and 1 guests.

Most users ever online was 81 at 1449555131 on 1449555131.

MarkFL
12-22-2015, 06:20 PM
...I found hot to fix it , and is works fine .

Link : http://tracker.vbulletin.com/browse/VBV-13957

Thanks Lynne

--------------- Added 1450815304 at 1450815304 ---------------

Idk what's wrong .... after 2 minutes is showing me this

What's Going On
Collapse
There are currently 2 users online. 1 members and 1 guests.

Most users ever online was 81 at 1449555131 on 1449555131.

I didn't know you were working on it, and I was trying as well, but I put it back, and you may have to reapply the fix you found from Lynne's link. I apologize for the inconvenience. :o

Hectorsky
12-22-2015, 06:25 PM
I didn't know you were working on it, and I was trying as well, but I put it back, and you may have to reapply the fix you found from Lynne's link. I apologize for the inconvenience. :o

Thanks as well :D , I just found that link and was trying to fix :D

If you have time can you help me to fix that 2 bugs :D

https://vborg.vbsupport.ru/showthread.php?t=321148

Thanks