ragunathjawahar / android-saripaar

UI form validation library for Android
Apache License 2.0
3.22k stars 460 forks source link

Add multilanguage support #141

Open csacanam opened 8 years ago

csacanam commented 8 years ago

You could use a strings.xml in order to give support to many languages. I could help you with spanish.

ragunathjawahar commented 8 years ago

@csacanam yes, we should be doing aars and localized strings. Feel free to send a PR. The code style is same as in AOSP.

robinsingh-bw commented 8 years ago

Is there any way to do this without modifying the library (or waiting for a PR)?

ragunathjawahar commented 8 years ago

You could use the messageResId attribute for localization. This issue is for the default error messages.

robinsingh-bw commented 8 years ago

Is it possible to specify a default messageResId for the different validators instead of adding it manually everywhere?

ragunathjawahar commented 8 years ago

@robinsingh-bw There is a related issue https://github.com/ragunathjawahar/android-saripaar/issues/92, I am still thinking about the best way to do this. Inputs are welcome.

robinsingh-bw commented 8 years ago

It is probably an overkill to force a default messageResId in a lib (which would have been ideal). My suggestion would be something simpler such as:

 Validator.setDefaultMessage(final Class<? extends Annotation> annotation, String message)

Then we can just setup default messages for all validators in a utility class or something.

LinkOut commented 7 years ago

Any news about translations?

MahmoudAlyuDeen commented 7 years ago

Localized error messages would really complete this already awesome library. I can help with Arabic translation.

Isabellle commented 7 years ago

I can help with french translation as well