daattali / timevis

📅 Create interactive timeline visualizations in R
http://daattali.com/shiny/timevis-demo/
Other
655 stars 157 forks source link

Translating Date Timeline #40

Closed alexmonteiro closed 6 years ago

alexmonteiro commented 6 years ago

@daattali , nice job! This is a awesome package that helps me a lot.

I would like to know if its possible to configurate timevis() to return de description of the month in others languages. I mean that always I use tivevis() the time line of months comes like "August 2014", "September 2014"... and I would to find a way to translate it before plot. Is it possible?

daattali commented 6 years ago

Good question! The timevis package is simply a binding to a javascript library, so the actual logic is not done by my package. You should look at the documentation for the javascript library and see if they support other languages. If it's supported by the library, then there should be a way to use options in timevis to do that. Check here: http://visjs.org/docs/timeline/

alexmonteiro commented 6 years ago

@daattali ,

Great! It works for me when I exported the timvis() graph to HTML, and there I imported moment.js. I've just set the locale options information.

config <- list( locale = 'pt-br')
timevis(data, options = config)

Unfortunately timeline doesn't import moment-with-locales.js or moment.js files, so it would be I great improve if timevis() package import this files, so the R console or viewer would show the timeline already translated. Is it possible?

daattali commented 6 years ago

This seems like a very specific usecase so I wouldn't want to import another js file just for this. You can try importing the moment library within your shiny app

On Nov 23, 2017 09:43, "Alexander Monteiro" notifications@github.com wrote:

@daattali https://github.com/daattali ,

Great! It works for me when I exported the timvis() graph to HTML, and there I imported moment.js. I've just set the locale options information.

config <- list( locale = 'pt-br') timevis(data, options = config)

Unfortunately timeline doesn't import moment-with-locales.js or moment.js files, so it would be I great improve if timevis() package import this files, so the R console or viewer would show the timeline already translated. Is it possible?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/daattali/timevis/issues/40#issuecomment-346635898, or mute the thread https://github.com/notifications/unsubscribe-auth/AA6IFKtinKr3EUwPL8Bs-7iLR4-BCbM9ks5s5YSsgaJpZM4Qnq9M .

alexmonteiro commented 6 years ago

Ok. Thanks for helping.