How do you localize Twitter bootstrap

When loading Twitters Bootstrap v3.1.1, I try to use some reusable items. These elements have English text that I can find and easily override, but there are messages that pop up and do a field check that I cannot find, probably because I am not familiar with the framework.

How can I find out more about these fields?

For example, validation messages in the form-signin username are acknowledged. How do I override this? Where is the text located? Is there a sample / best practice for this kind of localization?

So, if you put this example at http://bootply.com , it becomes easy to see what happens.

Field text and placeholder text are easily localized.

But when you try to enter the wrong email address, you get a popup. How to localize this popup when you put NO-EMAIL and click submit?

 <div class="container"> <form class="form-signin" role="form"> <h2 class="form-signin-heading">Please sign in</h2> <input type="email" class="form-control" placeholder="Email address" required autofocus> <input type="password" class="form-control" placeholder="Password" required> <label class="checkbox"> <input type="checkbox" value="remember-me"> Remember me </label> <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button> </form> </div> 
+8
twitter-bootstrap localization
source share
2 answers

The translation is done in the HTML 5 control. You can override this in the oninvalid event on the input element.

 <input type="email" class="form-control" placeholder="E-post addresse" required autofocus oninvalid="this.setCustomValidity('your message')" > 
0
source share

I am almost 100% sure that the popup is taken from jquery.js and you have to dig there. This text (about email) changes the language. I am writing from Poland and I have pop-ups. If you want to use another jquery validation plugin

check out Unheap JS Repository

When you use Ketchup Validator, you will have custom message checks

+3
source share

All Articles