You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Hasan Çelik <hs...@gmail.com> on 2015/04/09 15:28:48 UTC

Internationalization with Wicket

Hi,

Before I created  properties class for every class, for example,

HomePage.html
HomePage.java
HomePage.properties
HomePage_tr.properties
SecondPage.html
SecondPage.java
SecondPage.properties
SecondPage_tr.properties

In this way, It caused visual pollution and takes a few times while
loading... after that I decided to create one properties file instead of
above..And I located it into the /resource directory...

When I run the program, I am getting an error... As I understand program
doesn't find the properties file in the /resource directory...I think I
should refer it in somewhere??

My question is; Is there a way to create one properties file like that for
Internationalization ?

Re: Internationalization with Wicket

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Yes.
MyApplication.properties
Put it next to MyApplication.java
On Apr 9, 2015 4:30 PM, "Hasan Çelik" <hs...@gmail.com> wrote:

> Hi,
>
> Before I created  properties class for every class, for example,
>
> HomePage.html
> HomePage.java
> HomePage.properties
> HomePage_tr.properties
> SecondPage.html
> SecondPage.java
> SecondPage.properties
> SecondPage_tr.properties
>
> In this way, It caused visual pollution and takes a few times while
> loading... after that I decided to create one properties file instead of
> above..And I located it into the /resource directory...
>
> When I run the program, I am getting an error... As I understand program
> doesn't find the properties file in the /resource directory...I think I
> should refer it in somewhere??
>
> My question is; Is there a way to create one properties file like that for
> Internationalization ?
>

Re: Internationalization with Wicket

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
by "library" I mean they will be exported inside a re-usable jar file and
used by different projects.

On Thu, Apr 9, 2015 at 3:35 PM, Ernesto Reinaldo Barreiro <
reiern70@gmail.com> wrote:

> You have to instruct maven or whatever other build tool to include things
> on resources... Also you can place a file MyApplication.properties next to
> your application class and fetch localization from there. I tend to use
> this last approach and only use APanel.properties or APage.properties if
> those components are part of a library.
>
>
> On Thu, Apr 9, 2015 at 3:28 PM, Hasan Çelik <hs...@gmail.com> wrote:
>
>> Hi,
>>
>> Before I created  properties class for every class, for example,
>>
>> HomePage.html
>> HomePage.java
>> HomePage.properties
>> HomePage_tr.properties
>> SecondPage.html
>> SecondPage.java
>> SecondPage.properties
>> SecondPage_tr.properties
>>
>> In this way, It caused visual pollution and takes a few times while
>> loading... after that I decided to create one properties file instead of
>> above..And I located it into the /resource directory...
>>
>> When I run the program, I am getting an error... As I understand program
>> doesn't find the properties file in the /resource directory...I think I
>> should refer it in somewhere??
>>
>> My question is; Is there a way to create one properties file like that for
>> Internationalization ?
>>
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>



-- 
Regards - Ernesto Reinaldo Barreiro

Re: Internationalization with Wicket

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
You have to instruct maven or whatever other build tool to include things
on resources... Also you can place a file MyApplication.properties next to
your application class and fetch localization from there. I tend to use
this last approach and only use APanel.properties or APage.properties if
those components are part of a library.


On Thu, Apr 9, 2015 at 3:28 PM, Hasan Çelik <hs...@gmail.com> wrote:

> Hi,
>
> Before I created  properties class for every class, for example,
>
> HomePage.html
> HomePage.java
> HomePage.properties
> HomePage_tr.properties
> SecondPage.html
> SecondPage.java
> SecondPage.properties
> SecondPage_tr.properties
>
> In this way, It caused visual pollution and takes a few times while
> loading... after that I decided to create one properties file instead of
> above..And I located it into the /resource directory...
>
> When I run the program, I am getting an error... As I understand program
> doesn't find the properties file in the /resource directory...I think I
> should refer it in somewhere??
>
> My question is; Is there a way to create one properties file like that for
> Internationalization ?
>



-- 
Regards - Ernesto Reinaldo Barreiro