Closed bniwredyc closed 2 months ago
Interesting. I'm not sure about adding an extra option for this as it raises the question of what else should be an option. I don't want a 100 line helper to become a config nightmare over time.
Some possible alternative approaches:
getLabel
private function overridable. Impacts key
option potentially.createable
function to allow returning custom label. Hard to differentiate from returning any value though.I'm kinda leaning towards 1. but will think on it more. Happy to hear arguments for just adding the config option though!
Hi! Totally understand your point. I'll think about how to implement a better solution. Argument for just adding the config option is it just works :) But, as you said, it's a little bit dirty and will potentially lead to an API change in the future.
Yeah. One additional thought - the reason for this is translation but not all languages would be a simple prefix word change.
@martinpengellyphillips so I thought about a better solution, but haven't found any yet :D Maybe use my simple solution for now? It makes solid-select i18n compatible for most cases. I promise to help if we find more complex case where it doesn't work. What do you think?
It feels more appropriate to add the locale
option, because this component actually has more than just Create
text. An internal dictionary corresponding to the locale
can be easily processed, what do you think?
@Hentioe the thing is you can change all the labels now except Create
, this is more flexible solution than internal dictionary imo
This will be possible in the next release, but using a different approach so closing this PR now. See #58 to follow along.
Hi, I need to display the "Create" text in different languages, what do you think about this simple solution?