You can use a standard \renewcommand
to modify the text:

\documentclass{article}
\newcommand{\someSpecialText}{A text that can be changed locally\ldots}
\newcommand{\testIt}{The value of \texttt{someSpecialText} is : ``\someSpecialText''.}
\begin{document}
% The default behavior.
\testIt
% Here I would like to change the definition of `\someSpecialText`
% or anywhere else in the document.
{% Start of group
\renewcommand{\someSpecialText}{A text that \textit{was} changed locally\ldots}
\testIt
}% End of group
% The default behavior.
\testIt
\end{document}
In the above example, the \renewcommand
was placed inside a group, defined by the braces {
and }
to localize the redefinition. If this behaviour is not desired, simply remove the braces to make the redefinition global from that point forward.
Of course, one can also write this in a macro form, which could be considered "shorter", with some default value. Here is an example:

\documentclass{article}
\newcommand{\testIt}[1][A text that can be changed locally\ldots]{The value passed to \texttt{testIt} is : ``#1''.}
\begin{document}
% The default behavior.
\testIt
% Here I would like to change the definition of `\someSpecialText`
% or anywhere else in the document.
\testIt[A text that \textit{was} changed locally\ldots]
% The default behavior.
\testIt
\end{document}
\testIt
is set up to output something with a default value. However, you can supply an optional argument that modifies the default behaviour.