Which is the best way using Internationalization in Java program as Confluence Plugin

I’m a starter beginning with the “Hello World” macro .
All works fine so I try to add a small functionality: Show additionaly a message from the property file.
So I extended my macro and found 2 ways how I can access in Java the properties.

Both approaches are working - but with different result.
(For testing I create 2 property files: hwi18n.properties and hwi18n_de.porperties)

  1. Using ConfluenceActionSupport.
    All works fine. I can switch the user language from English to German, and the correct properties are fetched in the java program an shown on the screen.

  2. Using the i18NBeanFactory
    The property is shown - but ONLY the one from macroname.properties.
    The user’s locale is ignored. The german properties are not shown.

Did a made something wrong - or is the way using i18BeanFactory not the best one?

Thanks for helping!

P.S. I uploaded the excerpt of both apporachesConfluenceActionSupport.docx (12.5 KB) i18NBeanFactory.docx (12.7 KB)