title: How to change the "Browse" button text
body: <p>I need to change the "Browse" button text according to the locale in a <strong>JSP</strong>. (Ex. Russian , Portuguese) for a <strong>Spring</strong> based project.</p>
  
  <p>Following is the current implementation for the browse button </p>
  
  <pre><code>&lt;td&gt;&lt;input type="file" id="file" name="fileName"/&gt;&lt;/td&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/bdjRN.png" alt="enter image description here"></p>
  
  <p>As I know we can't change the text for input type <strong>file</strong>. It's the default behavior for a browse button int he browser. </p>
  
  <p>I tried the following solution</p>
  
  <pre><code>&lt;input type="button" id="button" value="Browse"/&gt;
  &lt;input type="file" id="fileName"  style="opacity:0; position:relative; left:-40px;"  onchange="javascript: document.getElementById ('fileName').value = this.value"/&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/UyjH3.png" alt="enter image description here"></p>
  
  <p>But above one is giving security issue in the browser.  </p>
  
  <hr>
  
  <p>In <a href="https://stackoverflow.com/">https://stackoverflow.com/</a> it's having the ideal solution for this (change text for the browse button using input type <strong>file</strong>):</p>
  
  <p><img src="https://i.stack.imgur.com/JD6bJ.png" alt="enter image description here"></p>
  
  <pre><code>&lt;input type="file" name="filename" id="filename-input" value="browse" size="18" style="float: right; width: 250px;"&gt;
  </code></pre>
  
  <p>Can anyone help me to resolve this problem or the way to implement above solution( <a href="https://stackoverflow.com/">https://stackoverflow.com/</a> file upload).</p>