Esperanto uses exactly this construction for greetings!
But if you said the phrase mi diras saluton every time you were greeting somebody, you would quickly get bored and look for ways to shorten in. One of the easiest ways to shorten that sentence is to get rid of everything except the main point: a greeting (although the object marker remains). So:
The Esperanto word for hi is saluton.
The same works for all the other greetings. Look at good day.
Day is tago in Esperanto.
It comes from the German Tag, which also means day, and is related to the English word day.
Let's try to apply it. Firstly say it not as a greeting but just as a phrase, thus you will not be marking objectivity on the first one. Then use it in a sentence, and finally as a greeting. Let's go: