Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

Issue with multilingual plugins #110

Open
goodwinpress opened this issue Aug 24, 2020 · 1 comment
Open

Issue with multilingual plugins #110

goodwinpress opened this issue Aug 24, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@goodwinpress
Copy link

Lack of ability to translate strings from editor and text fields using plugins like Polylang etc. Preferably to make all strings translatable.

@davidsneighbour
Copy link
Owner

This is possible. Needs some work hours to get all the instances where created descriptions and titles are used and add translation functions with a translation namespace.

Right now the translation namespace is 'titan_framework' if not defined. I would suggest we use the option id or create a new option slug that handles a namespace so developers can create their own namespaces within their themes/plugins.

id is currently not required, I would make it required in the future. It is created currently by lower-casing the name attribute of panels/tabs and replacing spaces with dashes. That will end us up with multiple namespaces if we have multiple option panels which too is not too usable.

So in the end:

  • if a property namespace is given, use that
  • else if an option id is given, use that (one id per panel/page/tab/customizer)
  • else use the internal namespace that is built from the name property (one id per panel/page/tab/customizer)

This basically puts it into the developers hands. If they want to have translations then they should use a namespace property to unify all translations.

Issues that will/might arise:

  • identical option labels will only be translatable once

By the way: I recently worked with Polylang and I could not find an option to re-create string translations after changing string-components. This might be a pro-feature. I will add a way to create .pot files for a Colossus setup.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants