A simple way to add internationalization feature to the JSON Resume project.
Create a different entry for each field that you want to localize, named with the language and the name of the field separated by an underscore. For example if you want to create an italian version and an english version of your summary do the following:
"basics": {
"name": "Richard",
"label": "Programmer",
...
"en_summary": "Richard hails from Tulsa. He has earned degrees from the University of Oklahoma and Stanford.",
"it_summary": "Richard proviene da Tulsa. Ha conseguito una laurea presso l'Università dell'Oklahoma e di Stanford.",
...
}
For a complete example you can look at the resume.json
file.
Then execute the command python3 localize.py
in the same directory of your json resume.
In this way you will create a directory for each language specified in the different fields.
Each directory contains a valid resume.json
that only contains the common fields (the ones without and underscore) and the ones related to that language.
Therefore, if we go on with the previous example, inside the it
directory you will have a resume.json
that has these fields:
"basics": {
"name": "Richard",
"label": "Programmer",
...
"summary": "Richard proviene da Tulsa. Ha conseguito una laurea presso l'Università dell'Oklahoma e di Stanford.",
...
}