Closed shakogele closed 5 years ago
Have you read docs? -> https://octobercms.com/plugin/rainlab-translate
Sure, and whats your point?
It's one option: https://github.com/rainlab/translate-plugin#message-translation Second add as lang pack with your plugin (example: https://github.com/OFFLINE-GmbH/oc-mall-theme, https://github.com/OFFLINE-GmbH/oc-mall-plugin).
Github issues really aren't the place for questions like this. Please use one of the many other avenues available instead of submitting new issues for your questions.
Forum: https://octobercms.com/forum StackOverflow: https://stackoverflow.com/questions/tagged/octobercms IRC: #october on Freenode or https://octobercms.com/chat Slack: https://octobercms-slack.herokuapp.com/
I think you did not undestand my point. I have fields in theme.yaml like this: my theme.yaml `
name: Blank
description: ''
author: ''
homepage: ''
code: ''
form: config/fields.yaml
and my config.yaml
tabs:
fields:
sitename:
label: Название сайта
type: text
span: left
default: something
tab: Основные настройки
logo:
label: Логотип
type: mediafinder
mode: image
comment: Рекомендуемый размер 250*50px
span: right
tab: Основные настройки
site_subtitle:
label: Подзаголовок сайта
type: text
span: left
default: sds
tab: Основные настройки
` I want to make these fields translatable
Github issues really aren't the place for questions like this. Please use one of the many other avenues available instead of submitting new issues for your questions.
Forum: https://octobercms.com/forum StackOverflow: https://stackoverflow.com/questions/tagged/octobercms IRC: #october on Freenode or https://octobercms.com/chat Slack: https://octobercms-slack.herokuapp.com/
I already submitted my question there and did not got answer
Directly in theme, I've already posted a single solution. if you have a plugin for a theme - different story.
Add lang dir and use it as a key in your config.yaml example: https://github.com/OFFLINE-GmbH/oc-mall-plugin/blob/develop/lang/ru/frontend.php#L23
sitename:
label: 'offline.mall::frontend.form.password_repeat' //author.name::translate.key
If you have only theme and want to translate within it:
name: My Theme
# [...]
translate:
en:
site.name: 'My Website'
nav.home: 'Home'
nav.video: 'Video'
title.home: 'Welcome Home'
title.video: 'Screencast Video'
Should be the key to use: site.name
, if I'm not mistaken.
I am also stuck with this. I understand the question - how do we make configurable options in our config/fields.yaml
Thanks!
Hi! II have fields in theme.yaml however I want to make these fields translatable, I'm using Rainlab.Translate plugin in my project. Thanks