Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customized messages #163

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

customized messages #163

wants to merge 14 commits into from

Conversation

mario-s
Copy link

@mario-s mario-s commented Mar 24, 2014

This patch is related to issue 21:

All default messages are merged into one map. It is possible to return a customized message for a single key by providing a different implementation for the resource function. If the user defined message is empty, then the default message from the map will be used. However the possible keys for the messages should be documented so that a user of the library knows what to customize.

A sample how the library can work together with the jquery i18n properties plugin:

$(function() {
            $.i18n.properties({name: 'messages', path: 'res/', mode: 'both', language: 'de'});
            $("input,textarea").not("[type=submit]").jqBootstrapValidation(
                    {
                        resource: function(key) {
                            return $.i18n.prop(key);
                        }
                    }
            );
    });

@mario-s mario-s changed the title customized messages #21: customized messages Mar 24, 2014
@mario-s mario-s changed the title #21: customized messages customized messages Mar 24, 2014
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.

None yet

1 participant