Skip to content
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

Interactive demo #420

Open
jzaefferer opened this issue Mar 16, 2015 · 5 comments
Open

Interactive demo #420

jzaefferer opened this issue Mar 16, 2015 · 5 comments

Comments

@jzaefferer
Copy link
Contributor

Here's an idea I had while reviewing #416: It could be pretty useful to provide interactive demos for each of the methods in Globalize. Have a text input field for the value to format or parse or validate, a select or similar for the Globalize method, and another one for the locale. Then the user can pick, for example, dateFormatter, provide a date (using a datepicker?) and pick a locale to have that date formatted in the given locale. In this case it should use a default pattern, but also allow the user to pick something else.

Could provide this as a demo in this repo for a start, then later host it on globalizejs.com. Might fit into GSoC proposals.

@mwmw7
Copy link

mwmw7 commented Mar 24, 2015

@jzaefferer Yes it is good idea~
Does your idea about interactive demos in mind looks like this?
image

image

@mwmw7 mwmw7 mentioned this issue Mar 24, 2015
2 tasks
@jzaefferer
Copy link
Contributor Author

That looks interesting, but not quite what I had in mind. More like this:

One demo consists of two inputs, both showing the same date, but in different locales. The first is US-English, the second one is configurable (using a select or autocomplete). Changing either input updates the other, so you could enter a date with a German or Korean locale in the second input and what it parsed and formatted as in the US locale in the first input. Add to that another select for different date and time patterns and update both inputs when the user picks a different pattern (or make that an autocomplete input, suggesting patterns or skeletons).

Then do the same for numbers, currencies and whatever else we have. For message format, one input for the data, one for the format, and an output area should work.

That point isn't to visualize locale data, but to let the user explore the API by interactive example.

@karthick-rajayan
Copy link

Hi @mwmw7 ,

Could you please check #491. i need to get the calendar data for a particular culture as you did in the demo. could you let me know how it can taken ?

@sotojuan
Copy link
Contributor

I'm taking a lot at #489, but would you guys be interesting in a demo using ClojureScript?

@rxaviers
Copy link
Member

@sotojuan, sure. Feel free to submit a PR with what you have in mind and we can discuss from there.

ashensis pushed a commit to ashensis/globalize that referenced this issue Mar 17, 2016
Add request_store to make Globalize thread safe with threaded web servers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants