On Thursday, June 14, 2012 8:23:43 AM UTC-4, Peter Taoussanis wrote:
>
> Hi all,
>
> Just put up an early release of a little i18n library that some of you 
> might find useful.
>
> It's on Github (https://github.com/ptaoussanis/tower) and Clojars (
> https://clojars.org/tower).
>
> Features (taken from the readme):
> * Consistent, lightweight wrappers for standard Java localization 
> functions.
> * Rails-like, all-Clojure translation function.
> * Simple, map-based translation dictionary format. No XML or resource 
> files!
> * Seamless markdown support for translators.
> * TODO: export/import to allow use with industry-standard tools for 
> translators.
> * TODO: Ring middleware for rapidly internationalizing web apps.
>
> As always, any and all feedback very welcome!
>
> Cheers!
>
> - Peter Taoussanis (@ptaoussanis)
>

All,

I've come up with a few questions for anyone who might be using this 
library including, but not limited to, its author :)

I have a prototype on which I'm working where I'm enjoying using tower for 
i18n, in particular, for its easy wiring up to ring and clojuresque nature. 
 Since this project happens to be factored into several smaller libraries, 
I've run into a couple of use cases that seem to be problematic:

1.  It seems useful to have the possibility for multiple 
libraries/namespaces to manage their own i18n complete with unique 
configurations (tower/config).  I'm not in this situation right now but it 
seems like it could come up.

2.  It also seems like a godd idea to be able to have code merge in a chunk 
of translations into the existing translation dictionary without replacing 
the existing contents.

I'm in situation 2 right now.  I have a core library that drives the 
system, deals with core compojure setup, and manages the tower i18n config. 
 This library then loads other namespaces (like plugins) and part of that 
process is to allow those plugins to do some initialization - in this case, 
part of that is merging their own dictionaries into (:dictionary 
@tower/config).  I have this working now by merging in the dictionaries 
with the assumption that the second-level keys are unique to each 
namespace/library so things don't setup on entries from other namespaces. 
 I've also not been using :dev mode since that can replace the dictionary 
with only the primary and I loose all plugins' dictionaries.

My questions are basically:

- Is there a better way that hasn't jumped out at me?
- If it's not there, is the merge idea valid and does it sound useful? 
 (I'd image it would also change :dev mode to allow a collection of 
"watched" dictionary resources and merge them when they change or something 
like that)

Thanks,
/stt

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to