0

I am looking for a mechanism that would enable the maintainer of the app, who will mainly be adding text content and images,to add the text directly inline in the erb templates that can be translated through a web interface. I'm thinking that something like a translation helper other than the i18n translate helper would be the best option.

The website is very large with over 800 pages of english text, using yaml files with the simple back end is not appropriate as there are over 800 pages of english text and that would just be too much of a nightmare to manage plus I have concerns of performance with such a huge amount text. Using something a key value store back end is also very problematic, there are multiple contributors both in development and through online collaboration and keeping databases in sync between the development and the production environments is a disaster waiting to happen even with the power of the likes of redis sync.

Example

<p>
Please let me know if you find any inaccuracy while browsing the site.
Your feedback is very important to us. Good and bad I wanna hear it all, so don't be shy and email me with your personal list of complains.
</p>

Could become

<p>
<%= translate('Please let me know if you find any inaccuracy while browsing the site.
Your feedback is very important to us. Good and bad I wanna hear it all, so don't be shy and email me with your personal list of complains.')%>
</p>

instead of the i18n way of something like

<p>
  <%= t(".paragraph_2")%>
</p>

It's a Rails 4 app if that makes a difference. I have looked at copycopter and refinerycms and ruled them out, I am currently evaluating the translation_center gem https://github.com/BadrIT/translation_center which has promise but I'm not totally comfortable with it.

Any ideas / solutions / pointers to gems that will address the concerns I have are greatly appreciated

jamesc
  • 12,423
  • 15
  • 74
  • 113
  • 1
    I don't think that's a good idea (sorry, not helpful). First, as you demonstrated it yourself, it's easy to break (your `#translate` use case contains a `'` character which break the string). Then, without id or anything to know which key to use, changing the content means not knowing anymore which is the related translation. Out of curiosity, why not copycopter ? – kik Sep 27 '13 at 13:53
  • Also, I can state as CTO (and as having been in a few other startups before) than non technical people *always* want some cms features at the beginning that become architecture nightmares and are finally never used. You should not accept to implement that if not especially important marketing text that should change often (and in this case, you can use wysiwyg to let admin edit it, but that should really be a minority of your website texts). – kik Sep 27 '13 at 13:58
  • copycopter looked inititially like the ideal solution for me but the interface to manage such a huge mount of translations was very awkward plus the risk of copycopter app being down and users seeing just keys instead of text is unacceptable to my client. Happy to look again if you feel those concerns can be addressed. Plus there is online collaboration needed as well, it just seemed like too much customisation needed and I would be better writing my own – jamesc Sep 27 '13 at 13:59
  • 1
    Well, copycopter is now an opensource self hosted app, so you could just host it on the same server as client app, which would reduce asynchronous downtime risks. – kik Sep 27 '13 at 14:02
  • That is definitely the way I would go if I chose copycopter, thank you. Do you have experience of copycopter? – jamesc Sep 27 '13 at 14:04
  • I didn't implemented it in production, just played with it and found it nice. As I said, I won't accept any cms feature unless really needed, so my production app only contains wysiwyg for marketing critical content. – kik Sep 27 '13 at 14:06
  • The W3C has a specification called "Internationalization Tag Set (ITS)": https://www.w3.org/TR/its20/. This specification describes mechanisms that you can use to identify which parts in your markup should be translated, and which parts should remain untranslated. Would that be helpful at all, or is it out of scope because of the server-side scripting? – Tsundoku Jul 22 '16 at 11:54

0 Answers0