• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Form date language to English

New Here ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

Hello,

I have Adobe Acrobat Pro DC English version. I created a form with field fomated as a Date with dd-mmm-yyyy. Document language is set to English but date picker is all over the world. Problem is that for date picker it is showing in there local laguage. After the date picker enter date and share the PDF form, field is populated in different laguage for me (Ex: Spanish,Japanese). I want to restrict the date language to English for all.

How can I fix this? Do i need to write any validation script for this ?

Thank you.

TOPICS
JavaScript , PDF forms

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

You can't. If you don't want it localized then don't set the month to be textual, only as a number.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

Your salvation may come with the ISO standard: yyyy-mm-dd

 

In any case this comics was made for you  😉

 

iso_8601

 

https://xkcd.com/1179/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

There's always an XKCD...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

The secret is that in this case you should not use the Date format, nor any other "format" and use this as a Validation script:

 

// VALIDATION SCRIPT
var d = util.scand("yyyy-mm-dd", event.value);
if (d == null) {
app.alert("Please enter a Date at the yyyy-mm-dd format.");
event.rc = false;
}

 

This script works with any date format, just edit what is orange.



Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

How is that different from using the Date format with that pattern? The issue is they're using "mmm" instead of "mm".

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

Apart the iso date format, you can add an invisible field.
In validation of the date field you type:
if (event.value!="") this.getField("invField").value=util.scand("dd-mmm-yyyy", event.value);
else this.getField("invField").value="";
and you create a document level script:
if (this.getField("invField").value!="") this.getField("theDate").value=util.printd("dd-mmm-yyyy", new Date(this.getField("invField").value));

You can try changing the language of your Acrobat Pro software.
@+

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2021 Jun 12, 2021

Copy link to clipboard

Copied

"How is that different from using the Date format with that pattern? The issue is they're using "mmm" instead of "mm"."

So he should use:

 

// VALIDATION SCRIPT
var d = util.scand("dd-mmm-yyyy", event.value);
if (d == null) {
app.alert("Please enter a Date at the dd-mmm-yyyy format.");
event.rc = false;
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2021 Jun 12, 2021

Copy link to clipboard

Copied

That doesn't solve the problem that the end-user could still enter the month name in their local language...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 13, 2021 Jun 13, 2021

Copy link to clipboard

Copied

LATEST

So the OP should loop to my first answer.  🙂

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines