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

Lokalize usage example on collection's text field #11

Open
entelostre opened this issue Nov 28, 2020 · 2 comments
Open

Lokalize usage example on collection's text field #11

entelostre opened this issue Nov 28, 2020 · 2 comments

Comments

@entelostre
Copy link

entelostre commented Nov 28, 2020

I would appreciate a minimal clear example of how to use the Localized option in a collection's text field.

Right now, when I set a field's Localization switch to ON, I then can't select a key from the Lokalize Project although I have some keys added.

image

PS. Hello and thanks for the amazing content!

@fredrikkarlsson-pervanovo

The localized collection field (Description) that you are working with has no connection to Lokalize as far as I know. Lokalize is a system to create localized strings. We use it to translate elements in our frontend application written in React.

If you want to localize your fields, you have to define a map of languages in your cockpit config, like this:
https://zeraton.gitlab.io/cockpit-docs/guide/basics/configuration.html#languages-object-array

@entelostre
Copy link
Author

Thanks, I already realized that I wrongly connected those two. I currently have a small system of mine for the non-dynamic content of the front-end (which doesn't involve cockpit) but I might switch to this dynamic (through CMS UI user translation). However, I understood how to use the Localize switch in order to have definitions of collection/singleton field values in multiple languages. This link helped me: https://getcockpit.com/documentation/reference/configuration

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

No branches or pull requests

2 participants