-
Notifications
You must be signed in to change notification settings - Fork 279
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
Internationalization #35
Comments
The schema should support inputting data in differently localized ways. The parser would then need to be told which one to use. This also needs to be supported by the templates, since also those need to be localized. It would probably be easiest to support different languages separately in the schema and in the templates, which could have different language versions. Maybe something along the lines of:
(or something like that, json is not my strong suite) |
Resume objects could be put inside a language (specifying language would be mandatory), like this:
Or, we could also simply repeat information in blocks. If no language is specified, EN_US is presumed. This might be easier to translate and maintain in different languages as all the languages are in the same sections. So if your resume gets longer, you don't have to scroll a lot to see what's missing translation. But it would be harder to parse.
|
I'm in favour of assuming a default locale and not requiring locale designations if there's only one locale. |
One of the technologies mentioned in #42, W3C JSON-LD, has a lovely, built-in capability for internationalization that maps to a strong underlying model: which uses the IETF tags It already has open source implementations in many languages (machine, not natural!) with a large conformance suite. The syntax provides a few patterns from which to choose, and looks like most of the means of handling that have been mentioned above...
Here's an example of the first few: {
"@context": {
...
"ex": "http://example.com/vocab/",
"@language": "ja",
"name": { "@id": "ex:name", "@language": null },
"occupation": { "@id": "ex:occupation" },
"occupation_en": { "@id": "ex:occupation", "@language": "en" },
"occupation_cs": { "@id": "ex:occupation", "@language": "cs" }
},
"name": "Yagyū Muneyoshi",
"occupation": "忍者",
"occupation_en": "Ninja",
"occupation_cs": "Nindža",
...
} Here's a language map: {
"@context":
{
...
"occupation": { "@id": "ex:occupation", "@container": "@language" }
},
"name": "Yagyū Muneyoshi",
"occupation":
{
"ja": "忍者",
"en": "Ninja",
"cs": "Nindža"
}
...
} |
+1 for internationalization... And I think something like
is easier to write and maintain (from a CV writer perspective, not a jsonresume programmer's) |
+1
{
"basics": {
"name": "Martin Wendt",
"label": {"en": "Programmer", "de": "Software Entwickler"},
"phone": "(912) 555-4321",
"summary": {
"en": "(default text)",
"en-GB": "(british english)",
"de": "(german translation)"
}
} |
Right, that's precisely what JSON-LD provides, though without as much magic. So for your example, you would either: specify that {
"@context": {
"label": {"@container": "@lang"},
"summary": {"@container": "@lang"},
},
"basics": {
"name": "Martin Wendt",
"label": {"en": "Programmer", "de": "Software Entwickler"},
"phone": "(912) 555-4321",
"summary": {
"en": "(default text)",
"en-GB": "(british english)",
"de": "(german translation)"
}
} As for client-facing translation: actually, more reasonable than most, as you'd have so much more context about what you are translating than just a big document. As a bonus, the data-at-rest could also be made international, as the context can also specify mappings of anticipated terms to the canonical namespace: {
"@context": {
"jro": "http://jsonresume.org/context/",
"zusammenfassung": "jro:summary"
},
...
"zusammenfassung": ..
} |
I have a feeling that this feature will only be needed in specific countries and specific industries. I live in The Netherlands and work in IT, and here pretty much everyone agreed on using English as language for resumes. We're living in an increasingly globalised world, where it makes sense to have one standard language in which to pass your resume around. The way I see it, this feature is not needed: if you are aiming to apply for jobs abroad/internationally oriented jobs, which require an English resume, you make your resume English. If you only want to work in Germany, you make it German. If you want to apply for jobs both in Germany and abroad (international jobs), and you really feel it is needed to have a resume in both English and German, you can just create 2 resume specs instead of one. Or you could ask yourself if you really want to work in a place where an English resume is not accepted ;) Either way, I don't see the strict need for this! |
+1 for internationalization (for ease of maintenance from the perspective of the CV/resume writer) |
^ditto |
Great idea! |
Question is do we make localization in the form of having multiple languages etc. as a first class citizen within the schema and therefore use a solution such as JSON-LD as suggested by @bollwyvl or could we use something like #203 to provide this. JSON-LD:
Tagging + duplication:
For making the standard be usable worldwide we need tagging + exporting based on tags anyway. This would also make it possible to localize specific section via duplication and tagging without making the schema itself more complex. Would love some other arguments for or against the solutions. |
I agree for both, but I think the tagging+duplication is far simpler. Also a tool can be used to export it from a json-LD, if someone want to use it. I am for simplicity here, but it could be to have the exporter/generator in the org as an external project. |
Ok one issue, which would not be solved with #203 are sections, which can only be added once. Such as basics. We have to think about a solution to this before deciding I reckon. |
On second thought, I don't ditto internationalisation as part of the schema. I hadn't realised that even the most basic information like |
So for i18n I was imaging that we spin up a new repo to eventually be a greater part of theme utils. The schema itself would never know of i18n other then vendors such as our registry who would inject into the meta data that it was a particular language. It would look as such: // ./theme-utils-i18n
/locales
en.json
fr.json
ge.json Each of those files would look something like this, // ./locale/fr.json
{
"basics": "bases",
"basics.name": "prénom",
"basics.label": "étiquette",
"basics.location.city": "ville",
... Such that each path to a schema property e.g. This won't catch all edge cases and I would expect these files to be extended further. But I think this approach will be easy for us to organize, easy for theme developers to include and offer great flexibility when rendering. For example on the registry server, we could easily add a query parameter ?lang=fr which will then automatically tell themes who have the package to included to replace the labels. Theme developers would use it as such: import {label} from 'jsonresume-theme-utils-i18n';
var resume = JSON.parse('resume.json');
var lang = req.query.lang;
var template = '<p>' + label(lang, 'basics.location.city') + ': ' + resume.basics.location.city + '</p>';
return template;
// <p>Ville: Paris</p> |
My suggestion is more related to labels, writing up my thoughts on data now. |
So if a user wanted to have multiple translations of their resume that they had written themselves I would rather us just rely on services to handle the conversion instead of relying on a schema based approach. e.g. I could edit the registry server right now to support it. The publish command at the moment takes a payload as such {resume: {}}, once received it is saved, and then posted to theme server upon request to generate the html. The publish endpoint could be edited such that it also accepts an array of resumes such as The user could write it in one big file such that the first resume in the list is the master and it fails safe such that if a property is missing in the third index, it would fall back to the second and finally to the first. [
{
meta: {
lang: 'en' // This is a service specific attribute so I am putting it in here
},
basics: {
name: 'Josef',
label: 'Fireman',
website: 'http://goofstuff.com',
},
},
{
meta: {
lang: 'fr'
},
basics: {
label: 'Pompier',
},
},
] So on the registry server, once I receive such a payload, I would merge it altogether based on which language I am targeting. This is just one example of how you can implement it at the service level. |
So I am at the moment +1 For service only implementation (Only potentially adding an official lang attribute to the new proposed |
+1 for |
Thanks @thomasdavis for the additional input. So many ideas now in my head. I think with the proposed I think this way it could be cleaner as we have one basic data source and everything else including localization is overwrite only. Additionally having it within the schema simplifies working with localization, filtering or other meta data for theme devs and tooling providers. |
That being said. I think that having a |
I find it slightly complicated for the neophyte but doable. |
Yeah, but it makes for a clean separation between base content and localization. |
@stp-ip Indeed. |
For internationalization we can use approach that currently used for development Google Chrome extensions. Here is an example: {
"basics": {
"name": "__MSG_basics_name",
"label": "__MSG_basics_label",
"phone": "(912) 555-4321",
"summary": "__MSG_basics_summary"
} and file with translations: // ./locale/en.json
{
"__MSG_basics_name": "Martin Wendt",
"__MSG_basics_label": "Programmer",
"__MSG_basics_summary": "....",
} I think this way simpler for development and clearer for understanding. |
Due to the finite nature of resume data size, I think we can use one file as the source of truth and then use tooling to export the various language/job specific resumes. One additional proposal could be to use the meta data section for translations etc., but provide examples on how to split it up into multiple files using the import methods of json schema. That way we have predefined a single file starting point, which can be extended/split up into multiple files. |
Thinking about it. The idea to make one source of truth for ease of use with the ability to reference sections from other files makes sense not only for translations, but as a general solution. Experts could separate their projects and work items into separate items etc. |
Any help needed? @stp-ip |
Hi, how is this project going? |
We are working hard to revive and get progress out of the door. I would say until the end of the year there will be quite a few milestones. Thanks for your continued interest. |
how's it going? |
Being worked on. Slow but steady progress. |
I did this script for myself and I hope that it helps someone in the meantime that the team is working on this. |
Any update on this guys? Thx! |
schema.json: Remove unneeded whitespace
Internationalization should be handled by an another package and/or just by copying your resume.json as en.resume.json|es.resume.json. There is no requirement of the schema to support it. |
I find it rude to unilaterally close this request after this many people showed interest. But anyway, here is why I disagree with you :
This is exactly the problem. If someone gives me a file named resume.json, I won't know in what language it is written. I'll have to take a look inside, and make a guess... and that's only if I am familiar with the alphabet and can recognize some words !. That is why I really like adding this extra-simple attribute :
|
I acknowledge my rudeness as I rush through these issues and I also apologize because my explanations are so short/brief. I will try give a reasonable explanation of my thinking;
Edit: I'm personally just pushing for a |
Thanks for your explanation, it's greatly appreciated as it encourages discussions and participation.
|
made a very hacky solution https://github.com/w-v/jsonresume-multilang |
I think at least the cli should accept a language parameter in order to tell the theme which language to compile for. The reasoning behind is, that is easy to have multiple .json files ( |
So I created a new theme that works for me. It exports a German and an English version. Here is a demo on how to use it. It would be perfect if the cli supported a way to specify the language desired so instead of:
one could simply do:
So maybe one should open an issue for |
the first usage is to send registry link to https://registry.jsonresume.org/mcarbonneaux but never the json itself... or a pdf version of the resume (rendered with cicd pieline)... when you send the registry url to manage multi linguage you need a solution to selecte the language of the resume... for the moment there no solution to do that with https://registry.jsonresume.org/xxxxx it would be useful to add The second usage is to add link to the registry in your personal profile on linkedin (linkedin is now multilanguage), github, or in you personal page... but in that way you cannot know in advance what language the reader prefere to use when read your resume... in that way you need to have a visual selector in your theme to display teh resume accordingly to the selected language. in that way of dooing you need to have all the language in the json and render in javascript in the browser not in the backend like actual registry url... or to redirect to another registry with language selector like
automatique translation with api generaly does not do correct translation in general, manual translation must always be available.
or using standard like json-ld : #35 (comment) |
i think is more simple to abel to select on the registry url the name of the gist as parametter jsonresume/jsonresume.org#107. he has no impact on the spec (and in existing template). if json resume are used in pipe line, we can use solution like #35 (comment). |
For people living in countries with multiple official languages (i.e. Canada has english and french), what is the recommandation?
It would be nice to be able to repeat sections with a identifier, i.e. FR_CA, EN_CA, etc.. So I would be able to generate PDFs with multiple languages.
The text was updated successfully, but these errors were encountered: