Requires After Effects 2020 or later.
If the expression isn't working go to: File > Project Settings > Expressions and make sure the dropdown is set to: Javascript
/**
* The following expression will format a number with
* separators in After Effects
*/
var num = [YOUR NUMBER HERE];
num.toLocaleString();
/**
* Create a new text layer and set it to 2000
* Apply this to the Source Text property of the text layer
* Change the location value to your locale code
* e.g: German would be "de-DE"
* this will then format the text based on the locale rules
*/
var num = parseFloat(text.sourceText);
var location = "en-GB";
num.toLocaleString(location);
Note: For this example, you will first need to do the following:
var num = parseFloat(effect("Slider Control")("Slider"));
var location = "en-GB";
num.toLocaleString(location, {minimumFractionDigits: 2});
Note: For this example, you will first need to do the following:
var num = parseFloat(effect("Slider Control")("Slider"));
var location = "en-GB";
num.toLocaleString(location, {minimumFractionDigits: 0});