Locale support #87

Closed
edthetechie opened this Issue Sep 19, 2012 · 7 comments

Projects

None yet

4 participants

@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

@andybellenie andybellenie was assigned Sep 19, 2012
@rip747
rip747 commented Sep 19, 2012

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.

@andybellenie
Contributor
  1. Devs need built in methods for adding custom localizations to the application structure.
  2. How does CF handle these usually?
@rip747
rip747 commented Sep 19, 2012

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.

@rip747
rip747 commented Sep 20, 2012

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

That makes sense, really the most important thing for me is to be able to
use it with custom language files so that the same localization method can
handle things both for wheels itself and my application views. If I can
help with any beta testing then let me know.

@perdjurner
Contributor

Closing this since we're not planning on releasing 1.2 from the "new-master" branch any more. Please reopen if this issue finds its way in to the "master" branch or future releases though.

Thank you.

@perdjurner perdjurner closed this Jul 14, 2014
@perdjurner perdjurner modified the milestone: 1.3.0, 1.2.0 Jul 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment