Skip to content

Conversation

@zAlweNy26
Copy link
Contributor

@zAlweNy26 zAlweNy26 commented Oct 19, 2025

Closes #12

@Norbiros
Copy link
Owner

Thank you for this contribution! For some reason I did not get any notifications related to nuxt-auto-form. At first glance it looks pretty great!

It would be nice to update project's documentation to mention i18n support, could you do that?

@zAlweNy26
Copy link
Contributor Author

Yeah no problem, I'll try to do that

@zAlweNy26
Copy link
Contributor Author

@Norbiros I'm sorry I was a bit busy, I hope the documentation I added is okay :)

Copy link
Owner

@Norbiros Norbiros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize for the delay.

I switched to your PR and started experimenting with it. I’m wondering, though—why can’t we just use $t() for the fields directly? Could you give a specific example where your solution provides a clear improvement?

Also, I noticed your solution doesn’t work for placeholders, which limits its potential usage.

As an alternative, maybe we could set the i18n key directly on the AutoForm component. Then it could dynamically query localized strings based on field names and metadata (so there is no need to write input: { title: 'input.title' }

BTW those test failures should be resolved, please rebase your branch

@zAlweNy26
Copy link
Contributor Author

zAlweNy26 commented Nov 26, 2025

Hi @Norbiros, how would you use $t() directly? I used this approach as it doesn't force the user to have the i18n module installed, but if you have another view I would like to see it.

Yes it doesn't work for placeholders at the moment. I have to find another way to support it.

I like your solution, but this way you force the dev to apply every key, what if I don't want to add a hint or an help text? Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat]: Support for i18n

2 participants