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

Tutorial: Correctly format large numbers and currency with an expression.

Community Expert ,
Apr 14, 2025 Apr 14, 2025

A quick expression to automatically add separators, decimals and currency symbols when using a text layer.

 

I have seen this problem raised a lot on the forums, namely how do you get the Expressions code or rather ExtendScript / JavaScript to automatically add thousands separators to numbers. And how can you have the same number displayed with different currencies? In the past I might have suggested replace(), split(), join() functions, but they are always a bit awkward to convert, but they are no good when splitting to begin with. But there is a simple function, built into JavaScript that After Effects can also use and it makes the whole thing simple:

Intl.NumberFormat().format()

With just a few options, you can easily format numbers according to any locale, making your project cleaner, smarter, and more professional.

 

TOPICS
How to
66
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
Adobe Employee ,
Apr 18, 2025 Apr 18, 2025
LATEST

Thanks for sharing the tutorial, @ShiveringCactus 


Thanks,
Nishu

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