0

last week i began developing an ASP.NET Page with Bootstrap (with LESS).

My website has an language switcher between German and English. This works fine for my own components.

But the Bootstrap sign-in form automatically uses the browser language. If an field is empty, i get a message to fill out all fields. I want to set the used language manually in all forms in Bootstrap.

Is this possible, or are there other options?

Thanks.

Edit:

here is my Code

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <div class="container">
      <div class="form-signin" role="form">
        <h2 class="form-signin-heading">
            <asp:Localize ID="LocalizeHeading" runat="server" 
                meta:resourcekey="LocalizeHeadingResource1" Text="Anmeldung"></asp:Localize> 
       </h2>
        <input ID="InputUsername" runat="server" type="text" class="form-control" placeholder="<%$ Resources: Authentification, PlaceHolderUsername %>" required autofocus>
        <input ID="InputPassword" runat="server" type="password" class="form-control" placeholder="<%$ Resources: Authentification, PlaceHolderPassword %>" required>
        <label class="checkbox">
          <input type="checkbox" value="remember-me"> 
            <asp:Localize ID="LocalizeRememberMe" runat="server" 
                meta:resourcekey="LocalizeRememberMeResource1" Text="Anmeldung speichern"></asp:Localize>
        </label>
        <asp:Button ID="ButtonSignIn" runat="server" Text="Einloggen" 
              class="btn btn-lg btn-primary btn-block" type="submit" 
              meta:resourcekey="ButtonSignInResource1" onclick="ButtonSignIn_Click" />
      </div>

    </div> <!-- /container -->
</asp:Content>
L_7337
  • 2,650
  • 28
  • 42
user3651595
  • 13
  • 1
  • 5
  • I do not believe that Bootstrap sets any default message (since it has not a "sign-in" form). If you are using the `tooltip` javascript component please check the `data-original-title` attribute of your `` field. If you are using a third-part library in order to generate the login code (as I suppose) you should mention which library are you using. – furins May 19 '14 at 07:59
  • Thanks for your reply. I use the example sign-in form from Bootstrap examples: http://getbootstrap.com/examples/signin/. The only third party library i use is JQuery. – user3651595 May 19 '14 at 08:04
  • Thank, now I understand the question - see my answer below – furins May 19 '14 at 08:18

1 Answers1

1

This is not a Bootstrap issue. The tooltip error is a default behaviour of HTML5 so, at the very end, it generates from the browser. The error generates since the input tag has the attribute required, then the browser will try to ensure that you place any text on it.

Please check changing the language of error message in required field in html5 contact form - in particular Rikin's answer in order to set setCustomValidity message using javascript.

Community
  • 1
  • 1
furins
  • 4,979
  • 1
  • 39
  • 57