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

Custom Date in different languages

Community Beginner ,
Oct 28, 2022 Oct 28, 2022

Hi all! 🙂

 

I'm trying to populate a field with an automatic date.

Since I need different PDF's with different languages I thought an array specifying the name of the month would be an idea. Unfortunatelly I can't seem to find any solutions.

 
The one thread I found with f.value = util.printd("mmmm d, yyyy", newDate()); worked, but only in english 😕 

 

has someone an idea how I could do it?

I'm using Adobe Acrobat Pro DC

 

thank you in advance for your help 🙂 

TOPICS
JavaScript , PDF forms
1.9K
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
Oct 29, 2022 Oct 29, 2022

Here is an example with several other languages.

@+

 

View solution in original post

Translate
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 ,
Oct 28, 2022 Oct 28, 2022

Hi,

If you write:

 

event.value=util.printd("date(en){MMMM}",new Date(),true);

 

you will get the month in English, but if you write:

 

event.value=util.printd("date(fr){MMMM}",new Date(),true);

 

you will get it in French. So if you write:

 

theLanguage=this.app.language.substr(0,2).toLowerCase();
event.value=util.printd("date("+theLanguage+"){MMMM}",new Date(),true);

 

you will get the month in the language of your Acrobat application.

https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/JS_API_AcroJS.html#language

...this is at a capital letter the same thing as:

 

event.value=util.printd("mmmm",new Date());

 

@+

Translate
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 ,
Oct 29, 2022 Oct 29, 2022

Here is an example with several other languages.

@+

 

Translate
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 Beginner ,
Oct 31, 2022 Oct 31, 2022
LATEST

Thank you so much😁 this really helped and gave me the solution to my problem 😁👏🏻🥳

Translate
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 ,
Oct 30, 2022 Oct 30, 2022

You can use this free Date picker, it works with 28 languages:

https://www.abracadabrapdf.net/utilitaires/utilities-in-english/magicdate-picker/


Acrobate du PDF, InDesigner et Photoshopographe
Translate
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