Closed BenjaminBrandtner closed 4 years ago
@BenjaminBrandtner Good idea, thanks for sharing! I just created a simple solution, but have an idea how to improve it in further releases (without BC).
Release: https://github.com/InteractionDesignFoundation/nova-unlayer-field/releases/tag/0.1.2
It should be as simple as using the
__
translation helper that is available on the Vue instance, i.e. change these lines:https://github.com/InteractionDesignFoundation/nova-unlayer-field/blob/d965fdfb825d3029cd1dbb4bedd243670db9bb67/resources/js/components/FormField.vue#L29-L34
to this:
Or maybe it's
this.__('Enter fullscreen')
, I'm not 100% sure.Anyway, like this, a developer can define a translation in a translation file and if none is defined it will still display the English text.
A more elaborate alternative (might be overkill) is to make the text completely customizable, something that could be used like this when instantiating the field: