Russian long date format

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Russian long date format

Unread postby rodrikwade » Tue May 15, 2018 12:39 pm

Hi

When I use either <%DATELONG%> or <%NOW(d MMMM yyyy 'г.')%> in a project set to use Russian in the Language Settings, the result is the following:

15 Май 2018 г.

This incorrectly uses the infinitive form of the month. The correct form should, apparently, be the genitive:

‎15 ‎мая ‎2018 ‎г.

Is there any workaround?

Regards

Rodrik
rodrikwade
 
Posts: 4
Joined: Sat May 05, 2018 5:41 pm

Re: Russian long date format

Unread postby Tim Green » Tue May 15, 2018 3:37 pm

Hi Rodrik,

What is your Windows language and system locale set to? The date strings get their formats and content from the Windows settings, so if Russian in Windows does it right you should be getting the right result. If your system is set to Russian and it's still wrong the error is in Windows... :?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
 
Posts: 19931
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Russian long date format

Unread postby rodrikwade » Tue May 15, 2018 6:02 pm

Hi Tim

I've set the Windows language to Russian (it's not my usual setting) and the location to Russia. Windows correctly displays the long date as ‎15 ‎мая ‎2018 ‎г. This is also reflected in Word if I insert a document property with the appropriate long date format: d MMMM yyyy 'г.'

However, the output from H&M remains: 15 Май 2018 г.

Regards

Rodrik
rodrikwade
 
Posts: 4
Joined: Sat May 05, 2018 5:41 pm

Re: Russian long date format

Unread postby Alexander Halser » Tue May 15, 2018 6:52 pm

Hi Rodrik,

What value do you get for the variable <%MONTHNAME%> ?
<%MONTHNAME%> equals to the format string <%NOW(mmmm)%> (note the lowercase "mmmm").

Help+Manual uses a Windows function to retrieve the date string. It displays whatever Windows delivers for a given format string. To get the date and time format for a given language correctly, Help+Manual calls the Windows function with a LocaleID, wich is derived from the project language. For Russian, make sure that your help project defines "Russian" as the project language in the configuration section.
Alexander Halser
Senior Software Architect, EC Software GmbH
User avatar
Alexander Halser
EC-Software Support
 
Posts: 3807
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria

Re: Russian long date format

Unread postby Alexander Halser » Tue May 15, 2018 8:03 pm

Hm... seems indeed to be an issue of the Windows API call used:
https://msdn.microsoft.com/en-us/librar ... 56(v=vs.85).aspx
Alexander Halser
Senior Software Architect, EC Software GmbH
User avatar
Alexander Halser
EC-Software Support
 
Posts: 3807
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria

Re: Russian long date format

Unread postby Alexander Halser » Tue May 15, 2018 8:28 pm

Ok. Please use the variable <%DATELONG%> instead of the formatting variable <%NOW(xxx)%>.

<%DATELONG%> will still return month names in the nominative form, but we are going to change that in the next update, so that it retrieves the genitive form of the long month name.
Alexander Halser
Senior Software Architect, EC Software GmbH
User avatar
Alexander Halser
EC-Software Support
 
Posts: 3807
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria

Re: Russian long date format

Unread postby rodrikwade » Wed May 16, 2018 11:28 am

Thank you for your response, Alexander.

I look forward to the update.

Rodrik
rodrikwade
 
Posts: 4
Joined: Sat May 05, 2018 5:41 pm

Re: Russian long date format

Unread postby Alexander Halser » Thu May 17, 2018 12:13 am

Hi Rodrik,

You can download the latest beta build 4482 from this link:
https://www.helpandmanual.com/download/ ... p-v736.exe

It is a stable beta and already includes the new date variables:

<%DATELONG%> returns the current date with long month names (change: now in genitive form).

<%DATE(d MMMM yyyy 'г.')%> is a new formatting variable to retrieve the date by using a formatting string. It returns the date only, without a time. Windows delivers the genitive form only for explicit date calls, the generic calls for a DateTime return month names in the nominative form. This variable is yet not documented, but works exactly like <%NOW(xx)%>, minus the time formatting options.

To sum it up:

<%NOW(d MMMM yyyy 'г.')%> returns "‎16 Май ‎2018 ‎г"
<%DATE(d MMMM yyyy 'г.')%> returns "‎16 ‎мая ‎2018 ‎г"
<%DATELONG%> returns "‎16 ‎мая ‎2018"
<%DATE%> returns "‎16 05 ‎2018" (this remains unchanged)
Alexander Halser
Senior Software Architect, EC Software GmbH
User avatar
Alexander Halser
EC-Software Support
 
Posts: 3807
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: No registered users and 1 guest