I decided to write this tutorial on English, even if my natural language is Romanian, to help others understand what this post is about.

During the development of one of my Arduino projects, i wanted to display the Time and Date on my own language. I started to look around over the Internet, but no tutorials or post are available about how to do it. So, I decided to look around the libraries i use for the DS1302 RTC module for Arduino Uno. I found out that it is actually very easy to translate the names of the day of week and months, but i didn’t wanted to use only my language, because the product i develop is intended for other language speakers too. So, i need it to be multi language.

This is how you should modify the libraries files to translated in your own language.

The file you could download is already modified for Romanian language, but it is very easy to modify it for any language. I will show you bellow how to do it.

So .. let’s start edit:

In library DS1302, you will need to edit the files DS1302.cpp and DS1302.h.

On the DS1302.cpp file you will need to add the following lines, right after the function: char *DS1302::getDOWStr(uint8_t format). Please note that i added the country code between DOW and Str in the function. You can add your own country code to make it unique.

On the same file, you will also need to add the following lines, right after the end of the char *DS1302::getMonthStr(uint8_t format) function. You also need to notice the country code inserted between Month and Str

Now, we also need to modify the other file, DS1302.h, and add a couple of line. Please note that in this file you need to add the same names ass before. On class DS1302 section on the file, you need to add :