title: How to retrieve the text labels in JavaFX controls before internationalisation
body: <p>I am making a JavaFX application where the content is loaded from JXML. I am now at the point where I am trying to change the language of the components dynamically without reloading the entire scene. I have seen <a href="https://stackoverflow.com/a/32468810/1830019">this answer</a> which created an observable ResourceFactory, which is exactly what I'm looking for, however it relies on having the keys for the controls available to look up the internationalised text from the resource bundle.</p>
  
  <p>How can I get the raw key from say a Button or a Label that is loaded from an FXML file using FXMLLoader.load(...? When I look at the attributes of the controls I can see the text attribute which gives me the text visible on screen, but what I'm after is the key used to look this text up - e.g. the '%homepage.enterbuttonlabel' rather than 'Enter'</p>
  
  <p>I've traced thorough the FXMLLoader.load method and found this in FXMLLoader$element:235</p>
  
  <pre><code>public void processInstancePropertyAttributes() throws IOException {
      if (instancePropertyAttributes.size() &gt; 0) {
          for (Attribute attribute : instancePropertyAttributes) {
              processPropertyAttribute(attribute);
          }
      }
  }
  </code></pre>
  
  <p>At this point the instancePropertyAttributes contain the element 'text' which has the '%homepage.enterbuttonlabel' that I'm after, but it would appear processing this value replaces it with the internationalised text.</p>
  
  <p>FXMLLoader$element is a private inner class of FXMLLoader, so I can't see how to override anything that could store this value in a new attribute before processing erases it. Short of Copying / Reimplementing the FXMLLoader class is there any way I can get access to that value?</p>