Skip to content
Antoine Mischler edited this page Sep 4, 2017 · 3 revisions

Resource bundle

FXForms uses resource bundles for internationalization and defining tooltips. When a form is created in a class called com.mycompany.MyClass, FXForm tries to load a bundle called MyClass in the directory com/mycompany.

Keys

Form anatomy

Component Key
labels field-name-label
tooltips field-name-tooltip
prompt-text field-name-prompt

Sample

Let's say you create a form in a class called com.dooapp.Demo, you can define the following files:

com/dooapp/Demo.properties

name-label=Name
lucky-label=Lucky
letter-label=Letter
mail-tooltip=Your email

com/dooapp/Demo_fr.properties

name-label=Votre nom
name-tooltip=Merci de choisir un nom sympa
name-prompt=Votre nom
letter-label=Une lettre
letter-tooltip=Ne pas mettre n'importe quoi
age-label=Votre age
height-label=Taille
height-tooltip=C'est tout?