Comments (1)
Another workaround for this might be to pass the field
key of the interpolated data through t()
:
const Component = Formio.Components.components.component
hook(Component.prototype, 't', function (t, [text, params, ...rest]) {
if (params?.label) {
params.label = this.i18next.t(params.label)
}
return t(text, params, ...rest)
})
This approach would give us more fine-grained control over how any of the interpolated strings are translated. We could even iterate over all the keys of the params
object and translate any that are strings.
from formio-sfds.
Related Issues (19)
- Find a better templating solution HOT 2
- Address component schemas are difficult to control HOT 3
- Script execution fails in IE, Edge < 78 HOT 1
- Some components don't show up in the translate view HOT 1
- Filipino translations don't always work on sf.gov HOT 1
- The "language" option is overridden by DOM lang attributes
- Explore more options for translation embedding HOT 2
- Figure out how to localize Choices.js strings
- Refactor translation process
- Generic translations don't always play nicely with form-specific Phrase projects
- Upgrade to formio.js 4.13.x
- Validate all components on 'blur' rather than 'change'
- Autocomplete word wrap needs work
- Datagrid style fixes HOT 1
- Get custom components working in the form.io portal HOT 1
- Figure out a different way to do form field localizations HOT 6
- Language detection overrides form options HOT 1
- Investigate better styling of date/time pickers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from formio-sfds.