Jump to content

The ultimate community for Ruby on Rails developers.


i18n backend advice needed

  • Please log in to reply
2 replies to this topic

#1 james



  • Moderators
  • 223 posts
  • LocationLeeds, U.K.

Posted 26 September 2013 - 02:08 PM

I am redesigning an existing website that has over 800 pages of content in multiple languages, the translated text is mainly done but I am really struggling over finding the best implementation for i18n to serve the content that will be created and amended both whilst in development by the owner of the project and in production through collaboration with an existing user base.


I have ruled out the refinery gem as an option due to the i18 refinery functionality not being available for Rails 4 which is a shame as it seemed like the best solution.

I am considering CopyCopter and Redis but I am torn.


CopyCopter solves the problem of adding text whilst developing locally and having that text also available straight away on the production server but creates a problem with being able to provide an intuitive interface to manage thousands of key value translations.


Redis with a custom CMS to provide an intuitive interface for managing the key values seems to be the way to go but this creates the problem of syncing development with production data. I am aware that there is a master slave db option with Redis but that really doesn't sit well with me for multiple reasons not least of which is the lack of portability. The text needs to live with the app so I can easily set up experimental code and pass the project around to other developers via git etc...


I am also concerned about performance and I can't stop thinking that i18n is not really a suitable solution for my needs. I am considering using the simple backend with yml files just for link translations and static text that appears in headers and footers and just creating specific templates for each language but that means a lot of repetition that I am wanting to avoid with tags and styling etc... plus it still leaves me with the problem of dealing with collaboration on the production server.


I am open to alternative suggestions and am happy to be corrected if I have made incorrect assumptions.



Programming is just about problem solving!

#2 awsmsce



  • Members
  • 1 posts

Posted 25 February 2014 - 10:27 PM

Did you ever decide on a solution for this? I find myself in a similar predicament and would love to know what you chose. I think i might go the redis / custom cms path, but if you found a nice way around thousands of key pairs, that admins will never be able to remember, I'd love to know.



#3 james



  • Moderators
  • 223 posts
  • LocationLeeds, U.K.

Posted 26 February 2014 - 02:36 AM

In the end I went with a mixture.

I used key value pairs for shared partials, things like menus header and footer etc..., stuff that doesn;t really change and I used language specific templates for main content. I'm not happy with any of the options available but feel I got the best balance available for my specific requirements and found the whole process very frustrating.

There are some very neat features like being able to create language sub folders within view folders and the current locale will just pick up the correct template but the whole i18n infrastructure is sadly lacking in ideal functionality.

Programming is just about problem solving!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users