New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New kendo artifact #155
Comments
Hi Maxim, I will do it shortly! Best regards, |
It is in JDK 1.7+ |
Yes :) but java7 only I'm afraid your LocaleUtils.getLangageCode method will produce wrong result for locale like "en" (without country) |
Oh, thanks Martin & Maxim, because I don't have it my jdk1.7.0_65... /**
* Gets the language-code (eg: xx-XX) from a given {@link Locale}
* @param locale the {@link Locale}
* @return the language-code
*/
public static String getLangageCode(Locale locale)
{
if (!Strings.isEmpty(locale.getCountry()))
{
return String.format("%s-%s", locale.getLanguage(), locale.getCountry());
}
return locale.getLanguage();
} Best regards, |
I believe the method is there since 1.7.0_0. It should be in _65 as well. |
Well, my eclipse project was pointing to a old jre (but it was supposed to be 7). I changed to jdk1.7.0_65 and I've got it! :) Thanks! |
Should be able to commit today (javadoc todo). Usage will be the following: @Override
public void renderHead(IHeaderResponse response)
{
super.renderHead(response);
response.render(JavaScriptHeaderItem.forReference(new KendoGlobalizeResourceReference(Locale.FRENCH))); // wicket7.x
// response.render(JavaScriptHeaderItem.forReference(new KendoGlobalizeResourceReference(KendoCulture.FR_FR)));
// response.render(JavaScriptHeaderItem.forReference(new KendoGlobalizeResourceReference("fr-FR"))); // or fr only
} |
Great! |
Oops, bad commit, correcting this asap... |
Deployed Additional note about
|
Thanks a lot! |
Everything works as expected :)) |
Hello Sebastien, |
Hi Maxim, Well, if you need it, I have to release it this week... Best regards, |
There is no rush actually, for 6.19 based version we are using ant for build and it doesn't work very well with maven snapshots. |
I will do it asap (this week) otherwise you will not have it before 2/3 weeks!.. (if you see what I mean... ;)) |
great! |
Hi Maxim,
Enjoy! |
Thanks a lot Sebastien! |
Hi Sebastien, kind regards |
Hi Patrick, Sorry, just saw this question. The answer is "almost" :)
// Application#init()
JQueryLibrarySettings settings = new JQueryLibrarySettings();
settings.setJQueryGlobalizeReference(JQueryGlobalizeResourceReference.get());
this.setJavaScriptLibrarySettings(settings); Best regards, |
Ah, ok, thanx... :) Minor additonal question. If I want them always being avaliable (for instance to feature a support of direct/hardcoded calls to jquery/kendo-ui javascript effects direct from my page-markup) I need to add them somewhere in my (border) page hierarchy manually like:
Is it correct? :) kind regards |
s/renderHead(HtmlHeaderContainer/renderHead(IHeaderResponse/ If you need them at every page then you can use |
Hi Martin, Patrick |
Hi Sebastien, Does it just provide the header contribution of the particular i18n culture file, or does it also enables the current culture by locale on js-client-side? best regards |
Hi Patrick, Nice to see you arround!
Nope, it provide the resource reference for the given language/culture, up to you to contribute to the header: @Override
public void renderHead(IHeaderResponse response)
{
super.renderHead(response);
// response.render(JavaScriptHeaderItem.forReference(new KendoGlobalizeResourceReference("fr"))); // or fr-FR
// response.render(JavaScriptHeaderItem.forReference(new KendoGlobalizeResourceReference(KendoCulture.FR_FR)));
// response.render(JavaScriptHeaderItem.forReference(new KendoGlobalizeResourceReference(Locale.FRENCH)));
}
Yes, exactly. Or if a (Wicket Kendo UI) component already support // Constructor, which use Locale and Kendo UI Globalization
new DatePicker("datepicker", Model.of(new Date()), Locale.FRANCE) |
I believe it might be useful to have artifact like wicket-jqueryui-kendo-culture to have all up-to-date "language" files in one place.
This artifact should have one "anchor class" (for ex. KengoGlobalizationAnchor.java) with no methods and JS files with kendo locales.
In this case one can use code like:
public static void renderTelericLocale(IHeaderResponse response, Locale l) {
response.render(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(KengoGlobalizationAnchor.class
, String.format("kendo.culture.%s.min.js", l.toLanguageTag()))));
}
to localize kendo widgets
The text was updated successfully, but these errors were encountered: