kotlin-faker
kotlin-faker copied to clipboard
Provide ability to extend a dictionary
I want to extends a localized dictionnary (not creating a new one) as provided ones are not fully localized
Is there any way to do this ?
Hi @abouquet , How would you want to extend it without modifying the contents of the .yml file? Right now the only way to extend the existing dictionaries is by modifying them and bundling with the application.
I've had an idea in mind to make it possible to provide new dict files (or even "extensions" to existing ones) outside of the application. But that requires some major refactoring and re-implementation, and I simply do not have much time for that right now, so that has not evolved pas an issue yet (https://github.com/serpro69/kotlin-faker/issues/8)
But maybe I'm misunderstanding what is it you're asking for. If you can provide some more details and examples, it could be that it's possible to do in an easy way now.
That is indeed what I am wanting : beeing able to provide new translation by adding new yaml file in the classpath for example. We can also think about an API to provide translated words by code (we some kind of builder pattern)
No matter how we can extend the translation, it would be great not to be forced to repackage the library with updated yaml files :)
Thanks for the input. Good to know I'm not the only one who finds such functionality useful :) Will pick this up.
Hi @abouquet , Kotlin-Faker 2.0 will have functionality that allows to create custom data generators (see here for details: https://serpro69.github.io/kotlin-faker/wiki/custom-data-provider/ ) It seems to me that that's something that covers this request as well, hence I'm going to close it. But feel free to re-open if you feel like that doesn't fully cover your description. I'd like to add as much as possible to kotlin-faker before releasing the next major version.