Re: Localization & URLs for Default Language

2019-09-06 Thread Rafael Bugajewski
Hello, I was comparing a Locale with a String, so please forget my previous message ;) Everything works as expected now. Thanks for this great idea that is much more lightweight than writing a link transformer. Best, Rafael > On 2019-06-09, at 01:21 PM, Rafael Bugajewski > wrote: > > Hello

Re: Localization & URLs for Default Language

2019-09-06 Thread Rafael Bugajewski
Hello Cezary, that’s actually a great idea. I tried to add a service advisor, but it doesn’t seem to do what I want: @Match("PersistentLocale") public static void adviseNullForDefaultLanguage(MethodAdviceReceiver receiver) { MethodAdvice advice = new MethodAdvice() { public void advi

Re: Localization & URLs for Default Language

2019-09-06 Thread Cezary Biernacki
You can always decorate PersistentLocale and change behaviour of get() by returning null from it, when the original result is your default locale. Cezary On Fri, Sep 6, 2019 at 10:45 AM Rafael Bugajewski wrote: > Hello, > > Tapestry supports putting the current locale into the URL path. I’m >

Re: Localization issue

2013-06-12 Thread Lance Java
This is core java and not really tapestry related. It's driven by Locale.getDefault() http://stackoverflow.com/questions/8809098/how-do-i-set-the-default-locale-for-my-jvm

Re: Localization question / problem ...

2012-02-22 Thread Gunnar Eketrapp
It just stroke me that it could have to with page abbreviations. I have problems with meeting/answers and meeting/list I.e. MeetingAnswers.java & MeetingList.java / MeetingAnswers_sv.properties & MeetingList_sv.properties which both are accessed with short hand format But it works if I skip the

Re: Localization question / problem ...

2012-02-22 Thread Gunnar Eketrapp
MeetingAnwsers_sv.properties i mean 2012/2/23 Gunnar Eketrapp > It does not have to do with the casing so it must be something else. > > E.g. page MeetingAnswers.java does not pick up texts > from MeetingAnwsers_sv.txt when running in Ubuntu > > The strange thing is that it only some of the page

Re: Localization question / problem ...

2012-02-22 Thread Gunnar Eketrapp
It does not have to do with the casing so it must be something else. E.g. page MeetingAnswers.java does not pick up texts from MeetingAnwsers_sv.txt when running in Ubuntu The strange thing is that it only some of the pages have this problem. I will add a MeetingAnwsers.txt now to se if that fix

Re: Localization question / problem ...

2012-02-22 Thread Howard Lewis Ship
There are some cases where you need to have the app.properties file for app_sv.properties to be picked up. However, when you hit a problem like this, it is most likely the case of the file name. Windows is case-insenstive, Ubunutu is case sensitive. Thus MyPage.java means MyPage.properties, and

Re: Localization Problems

2011-09-13 Thread Rendy Tapestry
Thanks Christian, In my subsequent reply that become separate thread, it was already corrected by Thiago, still got the same result (still use US locale instead of what I change in PersistentLocale). I give up with solution #2 and try solution #1 with success. Thanks again Christian for your help

Re: Localization Problems

2011-09-12 Thread derkoe
Rendy Tapestry wrote: > > Hi Christian, > > Thank you for taking time to help. I try to solve my problem using second > approach from your suggestion. Creating LocalizationDispatcher and > register > it before PageRender. I try to run my application, it seems rendering > wasn't > happened (blank

Re: Localization Problems

2011-09-09 Thread Rendy Tapestry
I am afraid that such solution won't work because I read this paragraph from documentation : You will see the new locale take effect on the next request. If it is changed in a component event request (which is typical), the new locale will be used in the subsequent page render request. Can anyone

Re: Localization Problems

2011-09-09 Thread Rendy Tapestry
Hi Thiago, Thanks for such fast response, after setting it to false, my page is showing up again but, the solution still not working. For example, if I have page named, test.tml and 2 component message catalog test.properties and test_in_ID.properties, after setting PersistentLocale to in_ID, tap

Re: Localization Problems

2011-09-09 Thread Rendy Tapestry
Hi Christian, Thank you for taking time to help. I try to solve my problem using second approach from your suggestion. Creating LocalizationDispatcher and register it before PageRender. I try to run my application, it seems rendering wasn't happened (blank page is returned). Here is my code snipp

Re: Localization Problems

2011-09-08 Thread Christian Köberl
2011-09-08 13:22, Rendy Tapestry: Yes, I just set as you do, but it doesn't work. This is because what browser send through request header is US locale. Based on tapestry mechanism looking up for locale, it will search the nearest locale that is en. That why ordering like that doesn't work. Any

Re: Localization Problems

2011-09-08 Thread Rendy Tapestry
Yes, I just set as you do, but it doesn't work. This is because what browser send through request header is US locale. Based on tapestry mechanism looking up for locale, it will search the nearest locale that is en. That why ordering like that doesn't work. Any other idea ? Sorry forgot to menti

Re: Localization Problems

2011-09-08 Thread Taha Hafeez
I have not used it but I think the first locale in configuration parameter tapestry.supported-locales( SymbolConstants.SUPPORTED_LOCALES) is used as the default. So "in_ID,en" will make in_ID as default. Just a guess :) On Thu, Sep 8, 2011 at 4:13 PM, Rendy Tapestry wrote: > Hi all, > > I buil

Re: Localization resources precedence

2011-04-05 Thread Hugo Palma
I've created an issue for this here https://issues.apache.org/jira/browse/TAP5-1498 On Fri, Feb 25, 2011 at 16:11, Everton Agner wrote: > Hey > > Does anybody know the answer for this question? I was hoping to understand > the mechanics for this case too... Since I might have coded some things n

Re: Localization resources precedence

2011-02-25 Thread Everton Agner
Hey Does anybody know the answer for this question? I was hoping to understand the mechanics for this case too... Since I might have coded some things not exactly safe, depending on the answer. Thanks! ___ Everton Agner Ramos 2011/2/23 Hugo Palma > Hi, > i was hopping to

Re: Localization changes in t5.2.2

2010-11-11 Thread Igor Drobiazko
Fixed: https://issues.apache.org/jira/browse/TAP5-1345 On Tue, Nov 9, 2010 at 10:36 PM, Moritz Gmelin wrote: > Hi, > > I have just done the upgrade of out application to T5.2.2. We have so far > had a system to redirect a user to a localized start page depending on his > locale settings. So far

Re: Localization changes in t5.2.2

2010-11-10 Thread Christophe Cordenier
ok, i will have a closer look. 2010/11/10 Moritz Gmelin > Something like this. > >@Inject >private PersistentLocale persistentLocale; > > >Locale loc = new Locale("de", "DE"); >persistentLocale.set(lo

Re: Localization changes in t5.2.2

2010-11-10 Thread Moritz Gmelin
Something like this. @Inject private PersistentLocale persistentLocale; Locale loc = new Locale("de", "DE"); persistentLocale.set(loc); Link link = linkSource.createPageRend

Re: Localization changes in t5.2.2

2010-11-10 Thread Christophe Cordenier
How do you build the redirect URL ? 2010/11/10 Moritz Gmelin > Hi, > > the supported Locales do contain de, de_DE, de_CH, fr_CH, etc. > > M. > > Am 10.11.2010 um 09:33 schrieb Christophe Cordenier: > > > Hi > > > > How is configured your supported locales ? > > > > 2010/11/9 Moritz Gmelin > > >

Re: Localization changes in t5.2.2

2010-11-10 Thread Moritz Gmelin
Hi, the supported Locales do contain de, de_DE, de_CH, fr_CH, etc. M. Am 10.11.2010 um 09:33 schrieb Christophe Cordenier: > Hi > > How is configured your supported locales ? > > 2010/11/9 Moritz Gmelin > >> Hi, >> >> I have just done the upgrade of out application to T5.2.2. We have so fa

Re: Localization changes in t5.2.2

2010-11-10 Thread Christophe Cordenier
Hi How is configured your supported locales ? 2010/11/9 Moritz Gmelin > Hi, > > I have just done the upgrade of out application to T5.2.2. We have so far > had a system to redirect a user to a localized start page depending on his > locale settings. So far those locale settings could contain la

Re: [localization] reusing facilities for enum-names

2009-04-08 Thread Igor Drobiazko
Provide translations for your Enum in the page's message catalog. For example in Page_de,properties: A.ONE=Eins A.TWO=Zwei On Sun, Apr 5, 2009 at 7:21 PM, manuel aldana wrote: > I got a java enumeration and would like to reuse the nice localization > facilities from tapestry 5. > > let's say I

Re: [localization] reusing facilities for enum-names

2009-04-05 Thread Ulrich Stärk
Use the Messages service. Uli Am 05.04.2009 19:21 schrieb manuel aldana: I got a java enumeration and would like to reuse the nice localization facilities from tapestry 5. let's say I have an enum: enum A{ ONE,TWO; } If it displays on a page I would like to have it displayed by the langua

Re: Localization problem with tapestry

2009-03-05 Thread Howard Lewis Ship
Sorry to say, but just building a JAR that has a WEB-INF folder doesn't add those files to the web application's context. I believe Tapestry 4 has options to move the global application catalog onto the classpath (rather than the default location under WEB-INF in the context); that's the only way y

Re: Localization in Services

2009-02-09 Thread Nicolas Charles
Blower, Andy wrote: Not sure how generally useful that would be, but it would solve the problem in an easy way. Thinking some more about this, would it not be easier to simply pass the messages from the page/component event handler method into the service method that's called to send the emai

Re: Localization in Services

2009-02-07 Thread Howard Lewis Ship
method > that's called to send the email? > >> -Original Message- >> From: Howard Lewis Ship [mailto:hls...@gmail.com] >> Sent: 06 February 2009 21:26 >> To: Tapestry users >> Subject: Re: Localization in Services >> >> Which Messages resour

RE: Localization in Services

2009-02-06 Thread Blower, Andy
Original Message- > From: Howard Lewis Ship [mailto:hls...@gmail.com] > Sent: 06 February 2009 21:26 > To: Tapestry users > Subject: Re: Localization in Services > > Which Messages resource would it inject? > > I suppose we could add the application's Messages obj

Re: Localization in Services

2009-02-06 Thread Howard Lewis Ship
ike you can with Logger. I take it that this is > not possible to provide in T5 because of lifecycle/reloading issues then > Howard? > >> -Original Message- >> From: Howard Lewis Ship [mailto:hls...@gmail.com] >> Sent: 06 February 2009 17:03 >> To: Ta

RE: Localization in Services

2009-02-06 Thread Blower, Andy
s Ship [mailto:hls...@gmail.com] > Sent: 06 February 2009 17:03 > To: Tapestry users > Subject: Re: Localization in Services > > I would go a different route. > > Using the ComponentSource service, you can get any page in the > application as a Component instance.

Re: Localization in Services

2009-02-06 Thread Howard Lewis Ship
I would go a different route. Using the ComponentSource service, you can get any page in the application as a Component instance. >From that you can get the ComponentResources and from that, the Messages >object. Just be aware of the lifecycle: once you boost a Messages instance out of the comp

Re: Localization in Services

2009-02-06 Thread Nicolas Charles
Thanks for the tip Roberto, but I didn't succeed into adding the app.properties (or just i can't get the key, i don't know) And it feels strange to use the ValidationMessage for a standart message Nick Tapestry Infodea wrote: I've forgetten a piece of code, you must contribute the ValidationMe

Re: Localization in Services

2009-02-06 Thread Tapestry Infodea
I've forgetten a piece of code, you must contribute the ValidationMessagesSource in your AppModule: public void contributeValidationMessagesSource(OrderedConfiguration configuration) { configuration.add("myprop", "it/infodea/app/internal/myprop"); } and define myprop.properties in it

Re: Localization in Services

2009-02-06 Thread Tapestry Infodea
You can use the ValidationMessagesSource and ThreadLocale services: ValidationMessagesSource validationMessagesSource; ThreadLocale threadLocale; Messages messages = validationMessagesSource.getValidationMessages(threadLocale.getLocale()); Roberto. Nicolas Charles ha scritto: Hello there,

Re: Localization in business objects

2008-07-09 Thread Davor Hrg
injection via annotations to fields is only possible for pages, components... for pages and comps byte code is changed and greater flexibility is possible, for services that tapestry autobuilds, tapestry will use the constructor with most parameters, everything else you must connect your self..

Re: Localization

2008-05-07 Thread Michael J. Long
ather than using new with the "language" string. I don't know why that would be an issue. -Original Message- From: dpark [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 07, 2008 10:28 AM To: users@tapestry.apache.org Subject: RE: Localization Thanks for the help but unf

RE: Localization

2008-05-07 Thread Jonathan Barker
that I used Locale.ENGLISH and Locale.FRENCH rather than using new with the "language" string. I don't know why that would be an issue. > -Original Message- > From: dpark [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 07, 2008 10:28 AM > To: users@tapest

Re: Localization

2008-05-07 Thread Michael J. Long
I observed a similar behavior, which I traced back to the RequestLocaleManagerImpl (see my post on the subject: ). As I have not received a response (and my implementation, which is attached, seems to have sol

RE: Localization

2008-05-07 Thread dpark
Thanks for the help but unfortunately that doesn't seem to work. Here's what I do: public void setLanguage( String language ) { getEngine().setLocale( new Locale( language ) ); getRequestCycle().cleanup(); throw new PageRedirectException( "Login" ); } Are you telling me th

RE: Localization

2008-05-07 Thread Jonathan Barker
Try executing cycle.cleanup() after you set the Locale. > -Original Message- > From: dpark [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 07, 2008 10:14 AM > To: users@tapestry.apache.org > Subject: Localization > > > I understand the following: > * in order to set the locale programm

Re: Localization of default messages

2008-04-29 Thread Manuel Corrales
Thank you very much! On Tue, Apr 29, 2008 at 9:11 AM, Michael Gerzabek <[EMAIL PROTECTED]> wrote: > Manuel, > > you simply put > org.apache.tapestry.corelib.components.Errors_es.properties (I suppose) in > your resources. If you use the maven archetype this should be > PROJECT_HOME/src/main/resou

Re: Localization of default messages

2008-04-29 Thread Michael Gerzabek
Manuel, you simply put org.apache.tapestry.corelib.components.Errors_es.properties (I suppose) in your resources. If you use the maven archetype this should be PROJECT_HOME/src/main/resources Manuel Corrales schrieb: Hi, i was checking the documentation but was not able to find how can i do

Re: Localization Problems in 4.1.5

2008-03-14 Thread Patrick Klein
Hello, i took a dive into the sourcecode and added a patch to https://issues.apache.org/jira/browse/TAPESTRY-1765 making the fallback work again :) Regards, Patrick Hello, I just tested if i can switch to 4.1.5 just to realize that the localization issue is only partially fixed. Szena

Re: localization of keys returned as properties in T5

2008-02-07 Thread Filip S. Adamsen
Have a look at http://wiki.apache.org/tapestry/Tapestry5HowToAddMessageFormatBindingPrefix - you'd have to change the messageKey String to a Binding and resolve that in the MessageFormatBinding, but then it would basically do what you're asking for. -Filip Brian Long skrev: Sorry about the

Re: localization of keys returned as properties in T5

2008-02-07 Thread Howard Lewis Ship
I hope to extend the property expression language ASR (after stable release) to allow more OGNL type things (such as passing parameters to methods). This could be accomplished as well by creating a custom binding prefix, i.e., "indirect-message:sender.address.addressLine1Label" which would resolve

Re: localization of keys returned as properties in T5

2008-02-07 Thread Josh Canfield
It seems a little strange to me to store resource keys in your objects... but I suppose I could imagine a situation where that'd be the most convenient thing to do. I don't believe there is a binding to fit your needs built-in, but it's something you could add. Check out http://wiki.apache.org/tap

Re: Localization of validation messagges and their css

2007-05-31 Thread Otho
Thanks! Too obvious to find it out myself... :) 2007/5/31, Juan Maya <[EMAIL PROTECTED]>: To override you need to add the css styles u want to override in u r own style sheet.

Re: Localization of validation messagges and their css

2007-05-31 Thread Juan Maya
To override you need to add the css styles u want to override in u r own style sheet. For example, if u want to override the tapestry style: div.t-error you create: newStyles.css div.t-error { border: 1px solid red; padding: 0px; margin: 4px 0px; } then u include the css in ur page and t

Re: localization oddity

2007-05-17 Thread Eric Schneider
Thanks, I did something similar. Except I used ISO-8859-1. I still don't have an explanation for the odd behavior, but it works...I move on. e. On 5/17/07, Daniel Kleine-Albers <[EMAIL PROTECTED]> wrote: Hi there, I had the same problem with German umlauts not rendering correctly. H

Re: localization oddity

2007-05-17 Thread Daniel Kleine-Albers
Hi there, I had the same problem with German umlauts not rendering correctly. Have a look at the character encoding of your files. I converted all my files to UTF-8 and since then all the labels (regardless in which message file) render correctly. Best regards Daniel On 10.05.2007, at 1

Re: localization oddity

2007-05-09 Thread Jesse Kuhnert
Not much - and definitely not anything that would be related to what you are seeingSo if you see an oddity that would explain it it has to in there, or your copy && paste of the characters didn't come through ok in the new file,. On 5/9/07, Eric Schneider <[EMAIL PROTECTED]> wrote: I'm stil

Re: localization oddity

2007-05-09 Thread Eric Schneider
I'm still using 4.0.2. Not sure how much has changed since then. e. On 5/9/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: I don't know what version you are on but most of that happens in here: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapes

Re: localization oddity

2007-05-09 Thread Jesse Kuhnert
I don't know what version you are on but most of that happens in here: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/ComponentMessagesSourceImpl.java?view=markup I haven't changed things ~too~ much in 4.1.2 but there are sligh

Re: localization oddity

2007-05-09 Thread Jesse Kuhnert
This sounds troublesome, if you file this in jira I should be able to track down the discrepancy. (if any) On 5/9/07, Eric Schneider <[EMAIL PROTECTED]> wrote: Hi, I'm in the process of moving my page and component message bundles into a global file. In the long run this seems like a much mor

Re: localization oddity

2007-05-09 Thread Eric Schneider
Thanks for the tip, I'll give it shot. I'm still very curious about why it would behave differently. :-| e. On 5/9/07, Michael Maier <[EMAIL PROTECTED]> wrote: I wonder that 'recap_label=Récapitulation' works... try man native2ascii *.properties are invented by english speaking man, so ev

Re: localization oddity

2007-05-09 Thread Michael Maier
I wonder that 'recap_label=Récapitulation' works... try man native2ascii *.properties are invented by english speaking man, so everything is ascii...:-) maybe this will help Am 10.05.2007 um 00:16 schrieb Eric Schneider: I'm in the process of moving my page and component message bundles

Re: Localization help

2006-07-31 Thread Malin Ljungh
Nope, nothing there at all, except for the image asset, of course. Malin On 8/1/06, Peter Dawn <[EMAIL PROTECTED]> wrote: thanks malin. nothing in the corresponding page files? - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Localization help

2006-07-31 Thread Peter Dawn
thanks malin. nothing in the corresponding page files? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Localization help

2006-07-31 Thread Malin Ljungh
I run Tapestry 4 but I think it works similar... or maybe not... this is what I do: In the html I have this: Swedish and in the corresponding java I have this: public void setLocale(String language) { getPage().getEngine().setLocale(new Lo

Re: Localization help

2006-07-30 Thread Peter Dawn
i forgot to mention that i am using tapestry 3.0.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Localization again

2006-07-25 Thread Jesse Kuhnert
The properties files come bundled with tapestry. You shouldn't need to worry about them. The workbench just sets the locale for tapestry "in general". The only way to clear up uncertainty is trying it. On 7/25/06, Peter Dawn <[EMAIL PROTECTED]> wrote: yes but am not sure if its using propertie

Re: Localization again

2006-07-25 Thread Peter Dawn
yes but am not sure if its using properties file implementation or something else. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Localization again

2006-07-25 Thread Jesse Kuhnert
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/localization/Localization.page?view=markup The workbench has an example of allowing users to change locales. On 7/25/06, Peter Dawn <[EMAIL PROTECTED]> wrote: hi guys, i have generated various

Re: Localization

2006-06-21 Thread Vu Nguyen
Hi, how do you specify the URL on the "refresh" parameter of the Shell component? I don't see the "content" as part of its parameters. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT