Decimal numbers in TeX can be input either with a period or a comma:
\hsize=10,5cm
is understood as well as
\hsize=10.5cm
However, this is about decimal numbers passed to TeX when required by its syntax rules. Printing numbers is a different matter, because TeX will print whatever you decide to.
So, if you define
\def\PI{3.14159}
and type \PI
in your document, TeX will dutifully output
3.14159
In order to ensure uniformity across your document, you have to input your numbers in a different way:
\newif\ifcomma % starts as false
\def\cp{% comma or period
\ifcomma{,}\else.\fi
}
\def\PI{3\cp14159}
The number $\PI$ is an approximation to $\pi$.
\commatrue
The number $\PI$ is an approximation to $\pi$.
\bye

If you're using LaTeX, there are a few options available; the best is using siunitx
and its \num
command that will typeset its argument according to what options you have selected.
siunitx
already offers a much better alternative to type-setting numbers. – Qrrbrbirlbel Sep 18 '13 at 12:55.
but the output use a comma or both input and output to change or... – David Carlisle Sep 18 '13 at 12:58