.properties files must be placed in the
folders shown in figure 1. otherwise Sweet Home 3D won't be
able to use them correctly. So don't move the files out of their
folder, don't rename any folder (except the
help) and don't delete any folder.
Renaming files depending on your language
Before translating the
.properties files, you should
rename each of them by adding to their name an underscore followed by
the 2 characters ISO code matching your language. You'll find this code
in the last column of the document http://www.loc.gov/standards/iso639-2/php/English_list.php.
Then, if you want to translate the help files, you should rename also
en subdirectory of
help with that 2 letters
For example, the ISO code for Czech is
cs. If you want
to translate Sweet Home 3D into Czech, each file name should be suffixed
_cs, and you should rename the files as shown in figure 2.
Figure 2. Properties files with their ISO code suffix
Translating properties files
.properties files are plain text files and you may
edit them with any text editor like Wordpad, TextEdit
or emacs. For example, the
file in Sweet Home 3D 3.0 contains the following text:
MacOSXConfiguration.BRING_ALL_TO_FRONT.Name=Bring all to front
SweetHome3D.3DError.message=<html>Sweet Home 3D will exit now because of a fatal error\
<br>in 3D rendering system. Please update the DirectX/OpenGL drivers\
<br>of your computer graphics card.
SweetHome3D.confirmSaveAfter3DError.message=<html>Sweet Home 3D must exit now because of a fatal error in\
<br>3D rendering system. Do you want to save all modified homes?
SweetHome3D.confirmSaveAfter3DError.doNotSave=Do not save
.properties file contains three kinds of lines:
- the lines that starts with a # character are comments (shown in
green in the previous example). Some comments contain legal information,
some give information to developers or to translators. Keep these
- empty lines are just used to separate the various parts of a
- the other lines start with some text used by Sweet Home 3D as a
key to find a text displayed at screen (shown in blue in the previous
example). Following this key, each of these lines contains an equal
=) and a text in a given language. Your job starts
from the equal signs. Don't change the text of the key and replace
the English text after the equal sign by its translation.
- The texts starting with a
tag contains some text at HTML format. These texts contain some other
HTML tags between
> signs, like
<br> in the previous
example which represents a carriage return in the middle of long texts.
Don't remove these HTML tags, they help Sweet Home 3D to present correctly
some texts. Translating text between HTML tags isn't very difficult,
except maybe for the worst HTML text which is the value of
- To avoid long lines in the text editor, some lines
are splitted in two or more lines and then separated by back slashes
\, like the line starting
in the previous example. In that case, don't remove the
sign located at the end of a line because it indicates the next line
follows the current line.
- Some texts contain special characters sequence starting
% sign, like
%2$s... These characters sequence
will be replaced by a file name, a unit or a number when needed, so
don't remove them.
For example, the character sequence
in the text of the following key
will be replaced by the unit currently in use. The two character sequences
that appear in the text of the following key
will appear at screen as a page number and the page count, and you
should translate only the word
- Some texts contain also the special characters sequence
\n, like in the following
HomeController.saveError=Can't save home in\n"%s"
This character sequence is displayed by Sweet Home 3D as a carriage
return to split a line at screen, and you shouldn't remove them.
- The value of the key
indicates the directory where the help files can be found. If you
translate the .
html help files, you should replace the
en subdirectory found by the 2 letters code of your language.
For example, if you translate help to Czech, it shoud become:
The text of the keys that ends with
are used by Sweet Home 3D to guess which letter in a label or a menu
item should be underlined for keyboard access. This mnemonic letter
depends on the displayed word and you should find a unique one per
dialog box or menu.
For example, the following texts and mnemonics displayed in the furniture
modification dialog box :
HomeFurniturePanel.nameVisibleCheckBox.text=Display name in plan
can be translated in French by:
HomeFurniturePanel.nameVisibleCheckBox.text=Afficher le nom dans le plan
HomeFurniturePanel.widthLabel.text=Largeur (%s) :
Use Sweet Home 3D or 3d
models import page to help you translate the
files ending by
Converting properties files to ASCII encoding
If you translated texts into a language
with letters not belonging to ISO-8859-1
encoding (mainly Central and Eastern Europe languages and languages
with a non-latin alphabet), you'll have to convert all your
files to an ASCII encoding supported by Sweet Home 3D. This conversion
can be done with the
native2ascii tool provided with the
JDK or can be performed
with the following form.
.properties file, create a backup of that file,
copy/paste the text to convert in the following text area, click on
the Convert button and copy/paste the converted text back in
The conversion tool will replace each non ASCII character (accented
latin letters and non-latin letters) by a sequence starting by
and followed by a 4 hexadecimal digits code matching that character
in Unicode. Miserably, this conversion will make your text quite unreadable
for a human, but if you don't perform it, Sweet Home 3D won't be able
to display the characters of your translation correctly. This is the
reason why you should create a backup of your original
files, in case you want to change them later.
If you want to directly edit
.properties files converted to ASCII, you may also use Properties Editor application available as a Jar executable file here.
Translating the help files
A good translation of Sweet Home 3D should also include the translation
of its help files. Translating all the
.html files is a
long task, but it will really help the users to learn the software and
avoid some support requests in Sweet Home 3D forum. Use any HTML editor
to translate these files, trying to keep the links it contains and its
style sheet unchanged.
Once translated, you should also create screen captures of the dialog
boxes in your language to replace the images found in
com/eteks/sweethome3d/viewcontroller/resources/help/en/images. To be able to create such screen
captures, create and test a first SH3L file with the following steps (once a SH3L file containing translated
.properties files exists, you may also request to the developer of Sweet Home 3D to generate the screen captures).
Creating the SH3L file
Once all the
are translated and converted to ASCII if necessary (or even before if
you want to test this procedure), you should zip them in a file. Depending
on your system, creating a zip file can be done with the following procedure:
- under Windows, select the
com folder containing all
the translated files and choose Send to > Compressed folder
from its contextual menu,
- under Mac OS X, select the
com folder containing all
the translated files and choose File > Compress « com »
- under Linux, select the
com folder containing all
the translated files, choose Create archive... from its contextual
menu then select .zip in the format list.
Finally, change the
.zip extension of the zip file
.sh3l. A SH3L file can have any name, but to avoid conflicts
with existing SH3L files, you should name it from the language it contains
and the version of Sweet Home 3D you translated (for example,
could be a good name for the French translation of Sweet Home 3D 4.1).
Testing a SH3L file
To test the translation, double-click on a SH3L file or choose it with the Import language library file button displayed at the top of the Preferences pane. This will launch
Sweet Home 3D and translate its user interface to the language described
in the SH3L file. This will also copy the SH3L file in a folder depending
on your system:
- under Windows Vista / 7 / 8 / 10, this folder is C:\Users\user\AppData\Roaming\eTeks\Sweet
- under Windows XP and previous versions of Windows, this folder
is C:\Documents and Settings\user\Application Data\eTeks\Sweet
- under Mac OS X, it's the subfolder Library/Application Support/eTeks/Sweet
Home 3D/languages of your user folder,
- under Linux and other Unix, it's the subfolder .eteks/sweethome3d/languages
of your user folder,
- with the portable version of Sweet Home 3D, it's the subfolder data/languages of the folder where Sweet Home 3D application is stored,
Note also that during the development of your SH3L file, you'll probably
have to relaunch Sweet Home 3D to see the changes in your SH3L file.
Distributing SH3L files
Once your SH3L file is ready, you can propose it to anyone, announce
it to Sweet Home 3D users in the forum
part reserved to foreign languages or in other places. If you agree,
it can be made available on this web site in the page about translations supported by Sweet Home 3D.
Updating SH3L files
Some releases of Sweet Home 3D bring new features to translate, some
don't. If you don't translate the user interface labels matching these
new features, Sweet Home 3D will work but all the new labels will appear
in English. To find the new keys and the updated keys in
files, you can use a feature offered by SourceForge.net that lets you
compare two versions of a project file:
- Click on the
you want to update in figure 1,
- Search the CVS tag of the version you want to compare to (for example
V_5_0 for version 5.0) and click on the link [select for diffs],
- Search the CVS tag of the other version you want to compare to (for
example V_4_6) and click on the link Diff to selected.
The last click will show you the differences between the two versions
.properties file (for example, this link
will show you the differences between the version 4.6 and the version
5.0 of the file
Once you found the differences, udpate your translation, adding new
key names if necessary, and release a new version of your translation.