If you want to make any text to be translated you have to use a plugin and mark the text as translatable. To do so you have to use __()
or _e()
instead of echo
. The difference beetwen __()
and _e()
is that first one doesn’t echo
the text while second one does. So if you do something like this: __("Some text", "text domain")
it will be marked as translatable text but it won’t be displayed but if you use _e("Some text","text domain")
the text will be also displayed on screen. Now if anyone will install a plugin he will see translated text