Closed delucas closed 10 years ago
Sure, i would :heart: to add that.
After a little research, I see no out-of-the-box support for i18n on mustache. I think you provide proper functionality with templates.
Maybe it can be added as scoped variables à-la-rails, in a yml file. Example with summary
:
{{#summary}}
<h2><span class="glyphicon glyphicon-compressed"></span>{{summary}}</h2>
<ul>
{{#points}}
<li>{{{.}}}</li>
{{/points}}
</ul>
{{/summary}}
And invoked like:
json_resume convert --lang=es example.json
Now: how can it be implemented, without affecting the free-templating capability?
Isn't the summary example the same as in the template. I couldn't notice the difference. I will research on the solutions in free time. Let me know if you have some ideas.
It's almost the same. Notice the mustache variable on the section title
L.-
On Fri, Jun 27, 2014 at 1:55 PM, Prateek Agarwal notifications@github.com wrote:
Isn't the summary example the same as in the template. I couldn't notice the difference. I will research on the solutions in free time. Let me know if you have some ideas.
— Reply to this email directly or view it on GitHub https://github.com/prat0318/json_resume/issues/3#issuecomment-47373762.
Ah.. i see what you meant. I agree keeping all of the visible text out of the templates would be a good step towards i18n.
Added 98fce6aa9c0399a856b1b49471829527e69c53b5 to add i18n for --locale=en|es|pt
@delucas can you confirm if the spanish conversions make sense (i used google translate) es translations
Made a little PR. Great job!
Thanks @delucas for a prompt PR :heart:
Add support for different languages. I'd love to help with Spanish, and a PR with the basic mechanism for i18n templating. Can we discuss the implementation?