I have a wordpress website and I would like to have the “posted X hours ago” in my post list. I found out that this can be easily done by calling the human_time_diff function.
The problem is that it returns the string in English (for instance 2 HOURS).
My website is in Portuguese, so I would like to have it in Portuguese.
How do I change the language this function returns?
Thanks,
Oscar
Edit: I found this link but this solution is simple rewriting the function
Is your wordpress installation in english or portuguese?
Usually using a portuguese installation forces wordpress to use a portuguese language file, which then prints the time difference in correct portuguese. The function
_n(...)from the original code is used for translation.You can also change the language of your installation afterwards.
Changing the language afterwards requires that you’re able to make changes to the
wp-config.php-file. Further steps are described here