Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n implementation #54

Open
oupala opened this issue Oct 19, 2015 · 12 comments
Open

i18n implementation #54

oupala opened this issue Oct 19, 2015 · 12 comments

Comments

@oupala
Copy link

oupala commented Oct 19, 2015

Have you planned to add i18n to this theme?

@mudassir0909
Copy link
Owner

Haven't yet, do you have any pointers, I can work on it during this weekend if you do. Sounds like a good feature. But again, we might then need the ability to use a particular language as a default language. The current resume schema doesn't support theme metadata, it is in talks & might get implemented in the upcoming version of resume schema. Nevertheless, we can implement i18n with English as default language for now.

Also, right now the resume is being rendered by the server so if we were to implement i18n then we might need to go for client side rendering so that we can rerender the whole view when a language has been changed.

@oupala
Copy link
Author

oupala commented Oct 20, 2015

I'm a real fan of gettext and there is many implementation of gettext in javascript.

I also think that english should be set as the default language if not explicitly set by the user.

I don't really understand how you imagine implementing i18n without metadata, but I thought it could be on the template side, before the server rendering.

@mudassir0909
Copy link
Owner

I was thinking of client side i18n implementation. Whenever the user changes the language we can rerender the view, similar to how we do it in Single Page Applications. Thinking in terms of SPA would be overkill & will affect SEO too, it should be rendered on server side with the metadata passed via theme query params, something like http://registry.jsonresume.org/mudassirali?lang=fr

@oupala
Copy link
Author

oupala commented Oct 21, 2015

I totally agree with you @mudassir0909 : server side rendering is better. It is also better when you think at static file, which is produced by the export command.

You should be able to export the resume in a particular language, then upload it somewhere to a web server.

@mudassir0909
Copy link
Owner

Yep, so let's wait until the next version of the schema is released

@oupala
Copy link
Author

oupala commented Oct 21, 2015

Ok.

But can you please explain me why waiting for the next version of the schema would help?

We talked about passing the language as a parameter of the export command. I don't see why we would need some schema metadata.

In your resume, it would mean to translate strings such as:

  • background
  • about
  • work experience
  • ...

Did you mean translating the whole resume? I was talking about translating the strings that come from the theme. It could be a good first step while waiting for schema metadata.

Oy maybe we misunderstand each other...

@mudassir0909
Copy link
Owner

I mean even if you want to translate just the section names, the translated strings should be part of the HTML generated by the theme server. Now, theme server right now just passes resume as argument for rendering theme, so there is no way to know which language the user has selected, getting me?

Also, it makes sense to translate the entire resume instead of just the heading, because if the section name is in a different language than the content, it's not really useful. For full translation maybe the users should have multiple copies of the resume? something like resume.en.json, resume.fr.json(this discussion could be part of resume-cli repo).

@oupala
Copy link
Author

oupala commented Oct 22, 2015

I agree @mudassir0909 the theme server needs to evolve. But I did not catch the link between the theme server and the next version of the schema.

I also agree that we might need full different version of each resume, and maintain multiple copies. I currently have sort of a resume.fr.json but my headings are in english. I would be pleased to be able to translate these headings in french also...

@mudassir0909
Copy link
Owner

Actually my bad, there is no link. When I said next version of schema, it is supposed to support metadata as part of resume object which theme developers can leverage to enable customisations. Now, in your case you might have the metadata as {lang: 'fr'}, so theme would render all the section names in french.

As of now, all we can do is implement with english as default language & perhaps add other languages when the schema starts supporting it, makes sense? If it does I'll start working on it when I get some free time.

@oupala
Copy link
Author

oupala commented Oct 22, 2015

I think we share the same vision. That's great!

@beratcarsi
Copy link

when is coming this feature? :)

@mudassir0909
Copy link
Owner

@beratcarsi I think to implement this in a theme we might need some changes in the resume schema , more like a language identifier using which the theme could render content in selected language. I guess this will be implemented in next major release of resume-schema. See this issue jsonresume/resume-schema#35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants