Four phrases to keep in mind when translating WoltLab Suite

WoltLab Suite can be translated through language files that contain (almost) all the phrases that you will see appear on your screen. In total the language files consist of more than 8000 lines or phrases that need to be translated one by one, but there are several phrases that are particularly important. Here we explain what they are and why they are so important.

Date format wcf.date.dateFormat

This sentence tells the Suite the date format we want to use. The default value in the English language file is M jS Y which would show the date as Jan 1st 2024. In the Spanish language file we use the format j \d\e F \d\e Y which shows the date as 1 de enero de 2024.

Time format wcf.date.timeFormat

We can also adjust the time format, choosing whether we want a 12-hour or 24-hour format. This variable even allows us to decide whether we want hours, minutes and seconds with leading zeros.

WoltLab Suite's default value in English is g:i a, which displays the hours in twelve-hour format followed by the abbreviations am or pm, as appropriate. In the case of our English translation, we have chosen the value H:i, which corresponds to the 24-hour format.

First day of the week wcf.date.firstDayOfTheWeek

Setting the first day of the week is important because, although in most western and eastern countries the week starts on Monday, there are countries and cultures where the first day of the week is Sunday. Therefore, WoltLab Suite's internationalisation system has also taken this factor into account and allows us to adapt the software to our culture.

The default value in the English language is 0, setting the first day of the week as Sunday. In contrast, in the Spanish translation we use the value 1, adapting to the Gregorian calendar and indicating to the software that our week starts on Monday.

Example calendar in English and Spanish.

Page direction (RTL support) wcf.global.pageDirection

When designing a web page, Spanish speakers usually design it to be read from left to right (Left-To-Right, LTR); however, not all languages use this reading and writing direction, for example, Hebrew or Arabic, which are read from right to left (Right-To-Left, RTL). WoltLab has taken this feature into account and its language system allows to set the reading direction of the page, also adapting the style template to ensure a correct layout of the information.

As you can guess, the default value is ltr (left to right) and can be changed to rtl (right to left) if we want to adapt our software to other write and read systems.


You can consult all the date and time format characters in the PHP manual and see all the possibilities that these variables have and you can also consult the WordPress manual with concrete examples for the customisation of dates and times.


More information | WoltLab Suite Documentation (in English)

Comments