Possible Duplicate:
Detect beginning of a sentence in a macro for capitalization
Is it possible to write a macro that is able to determine if it is used at the beginning of a sentence? For example, imagine
\def\location{street}
...
This \location is nice. \location has its charm.
A simple and silly one, but anyway, you get the idea. I want the second street to be "Street." How would one do this? I am using lualatex, so if only a lua-specific solution is possible, I'd be happy with it. If it is not possible then I would have to do it manually, but that would be a lot of work in my text :-(

\frenchspacingis set though. Withnonfrenchspacingset beforeifnumit seems to work withfrenchspacingtoo. – Peter Breitfeld Jul 21 '12 at 20:04