Can you paste your LT script here that you are attempting to use so I can try it? I will get back to you with what I find out!
Also I submitted this PR to Vis-Timeline: https://github.com/visjs/vis-timeline/pull/1267
timeline add new locale in PF10
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
http://infoside.lt/failai/primefaces/calendar.js
This file i inlude in xhtml via template and i have no problem with calendar translations.
Extender i using like this
This file i inlude in xhtml via template and i have no problem with calendar translations.
Extender i using like this
Code: Select all
<h:outputScript>
function timelineExtender() {
//copy the config options into a variable
var options = $.extend(true, {}, this.cfg.opts);
var options =
{
locales:
{
// create a new locale (text strings should be replaced with localized strings)
lt:
{
current: 'einamas',
time: 'laikas',
deleteSelected: 'Istrinti pasirinkta',
}
},
// use the new locale
locale: 'lt'
};
//merge all options into the main timeline options
$.extend(true, this.cfg.opts, options);
};
</h:outputScript>
I see the problem. Let me see if I can get you a fix. Give me one day.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
OK your extender is correct. Now add these two scripts in your h:head and make sure they are first.
That adds the Lithuanian Moment.js locale into the context before the Timeline loads. This worked for me!
I also added your localte-lt.js client translation to PrimeFaces core with this PR: https://github.com/primefaces/primefaces/pull/8004
If interested we need a server side translation as well???
Code: Select all
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/locale/lt.js"></script>
I also added your localte-lt.js client translation to PrimeFaces core with this PR: https://github.com/primefaces/primefaces/pull/8004
If interested we need a server side translation as well???
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
I got it working locally. I will create a small runnable example for you.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
OK working example: https://github.com/primefaces/primeface ... -950830096
Grab that zip file and unzip it and run "mvn clean jetty:run" and navigate to http://localhost:8080/primefaces-test/test.xhtml
Grab that zip file and unzip it and run "mvn clean jetty:run" and navigate to http://localhost:8080/primefaces-test/test.xhtml
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
So in a future release once Vis Timeline accepts my PR you should just be able to set Locale to "lt" and it should just work. But not until Vis Timeline accepts my PR and cuts a new release.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 40 guests