Skip to content
This repository

Locale support #87

Open
edthetechie opened this Issue · 6 comments

3 participants

edthetechie Anthony Petruzzi Andy Bellenie
edthetechie

Tony asked me to post an issue regarding the new locale support for 1.2. Specifically some of the internal wheels methods that need to have localization included. So that's what I'm doing :)

Here's the list I posted in the Google Group:

https://groups.google.com/forum/#!msg/cfwheels/imQoQjcRzVo/HYKwt-9jfvMJ

distanceOfTimeInWords()
timeAgoInWords()
timeUntilInWords()

If I see others then I will add them here as comments.

HTH

Anthony Petruzzi
Owner

awesome! we'll use this ticket as an initial case for methods that need locale support. Also I need to make sure that devs can override the wheels locale.

Andy Bellenie
  1. Devs need built in methods for adding custom localizations to the application structure.
  2. How does CF handle these usually?
Anthony Petruzzi
Owner

you have to call the setLocale() method

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=i18n_08.html

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_s_05.html#136340

i was thinking that we could have a locale directory off the root that dev could add their own locales into or use to override an existing locale. on application load, it would load the wheels included ones first, then load the devs' overriding what wheels set. what do you think?

edthetechie

From my perspective that's a great idea and would give me what I need for localization of my app. The closer it is integrated into native CF functionality the better because it would allow for things like LSCurrencyformat() which is also a key part of the whole process.

Anthony Petruzzi
Owner

the only thing that the LS* method in CF do, is look at the currently set locale and format the output depending on them. with us creating out own locale file, we'll essentially be doing the same thing only we'll be able to add the ones that Java doesn't support directly.

here are the locale files for rails (US English only):

https://github.com/rails/rails/blob/master/actionpack/lib/action_view/locale

https://github.com/rails/rails/tree/master/activemodel/lib/active_model/locale

https://github.com/rails/rails/tree/master/activerecord/lib/active_record/locale

https://github.com/rails/rails/tree/master/activesupport/lib/active_support/locale

this is there i18n project with all locale:

https://github.com/svenfuchs/rails-i18n

http://ruby-i18n.org/

edthetechie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.