Currently, frontmatter fields aren’t being translated. I would appreciate it if we could configure which frontmatter fields - such as 'slug' 'summary', 'ogTitle', 'metaTitle' etc. - should be translated.
For example, in Hugo, I have a 'review' archetype with 'pros', 'cons', 'verdict' etc., as frontmatter.
> Currently, frontmatter fields aren’t being translated. I would appreciate it if we could configure which frontmatter fields - such as 'slug' 'summary', 'ogTitle', 'metaTitle' etc. - should be translated.
> For example, in Hugo, I have a 'review' archetype with 'pros', 'cons', 'verdict' etc., as frontmatter.
_Originally posted by @nachbelichtet in [#1054](https://github.com/estruyf/vscode-front-matter/issues/1054#issuecomment-5140653011)_
<!-- github-sync-id:5028528608 -->
Thanks for the suggestion @nachbelichtet! I added a translate property which you can set on the fields of your content types.
By default, only the title, description, and the content of your article are sent to the translation service. Any other field now requires translate: true:
If you do not want the title or description to be translated, you can set translate: false on those fields.
A couple of details:
The property also works on fields nested in a fields field, and on the fields of the field groups used by a block field.
When the value is a list, each of the values is translated individually.
Field types which do not hold text (boolean, choice, contentRelationship, dataFile, datetime, divider, draft, file, heading, image, json, and number) are never translated.
This is available for testing in BETA release: 10.12.306288402
Thanks for the suggestion @nachbelichtet! I added a `translate` property which you can set on the fields of your content types.
By default, only the title, description, and the content of your article are sent to the translation service. Any other field now requires `translate: true`:
```json
{
"name": "review",
"fields": [
{ "title": "Title", "name": "title", "type": "string" },
{ "title": "Description", "name": "description", "type": "string" },
{ "title": "Verdict", "name": "verdict", "type": "string", "translate": true },
{ "title": "Pros", "name": "pros", "type": "list", "translate": true },
{ "title": "Cons", "name": "cons", "type": "list", "translate": true }
]
}
```
If you do not want the title or description to be translated, you can set `translate: false` on those fields.
A couple of details:
- The property also works on fields nested in a `fields` field, and on the fields of the field groups used by a `block` field.
- When the value is a list, each of the values is translated individually.
- Field types which do not hold text (`boolean`, `choice`, `contentRelationship`, `dataFile`, `datetime`, `divider`, `draft`, `file`, `heading`, `image`, `json`, and `number`) are never translated.
Documentation: https://beta.frontmatter.codes/docs/content-creation/multilingual#define-the-fields-to-translate
This is available for testing in BETA release: `10.12.306288402`
<!-- github-comment-id:5142619299 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally posted by @nachbelichtet in #1054
Thanks for the suggestion @nachbelichtet! I added a
translateproperty which you can set on the fields of your content types.By default, only the title, description, and the content of your article are sent to the translation service. Any other field now requires
translate: true:If you do not want the title or description to be translated, you can set
translate: falseon those fields.A couple of details:
fieldsfield, and on the fields of the field groups used by ablockfield.boolean,choice,contentRelationship,dataFile,datetime,divider,draft,file,heading,image,json, andnumber) are never translated.Documentation: https://beta.frontmatter.codes/docs/content-creation/multilingual#define-the-fields-to-translate
This is available for testing in BETA release:
10.12.306288402Released in version 10.12.0.