Go AVDN
Modifying The App's MetaBundle

Now let's modify our first MetaBundle: tutor.meta.Brief.

Please locate D:\study\av6\tutorials\examples\tutor\meta\Brief.java (on MS-Windows™) or /home/compl/study/av6/tutorials/examples/tutor/meta/Brief.java (on Unix like OS) , and you should see two XML files, Brief.meta and Brief_zh.meta together with it.

Now open D:\study\av6\tutorials\examples\tutor\meta\Brief.meta (on MS-Windows™) or /home/compl/study/av6/tutorials/examples/tutor/meta/Brief.meta (on Unix like OS) with your text editor, the beginning lines should look like:

<?xml version="1.0" encoding="UTF-8"?>
<java>

 <tips>
  <tip title="Tips">
   <![CDATA[
In this panel you get tips about how to play with this demo, see other tips 
under each Tab.
<br>
Tip tabs here are populated by meta array <code>tips/tip</code> inside MetaBundle
file <code>tutor/meta/Brief.meta</code>
]]>
  </tip>

.....

Okay, now replace the green text at above with red text at below: (but DO NOT change other lines in this file!!)

<?xml version="1.0" encoding="UTF-8"?>
<java>

 <tips>
  <tip title="Tips">
   <![CDATA[
In this panel you get tips about how to play with this demo, see other tips 
under each Tab.
<br>
I have seen and modified meta array <code>tips/tip</code> inside MetaBundle
file <code>tutor/meta/Brief.meta</code>
]]>
  </tip>

.....

After saving this file in your text editor, switch to the Demo App window, it should still look as initially started:

The Brief Demo App Window
Before Reload Any MetaBundle Change

Now press [Reload MetaBundles] button at right-bottom of the demo app's window. The text under the first tip tab should change accordingly, as below:

The Brief Demo App Window
After The First Tip Modified And Reloaded

Of course you can change the tips to any other text, or even add or remove tips, as you like. Feel free to play.

-~----------~----~----~----~------~----~------~--~-----~--~----~--------

Easy? Okay, let's seek a new challenge now, CREATE a new text file: D:\study\av6\tutorials\examples\tutor\meta\Brief_fr.meta (on MS-Windows™) or /home/compl/study/av6/tutorials/examples/tutor/meta/Brief_fr.meta (on Unix like OS) , and enter file content as below:
(You have to pay particular attention to the file encoding, the actual format your text editor writes must conform to the one declared at the first line of the file content.
If you have troubles with file encoding, such as SAXParseExceptions in the console window, change the file content into plain english and try again.)

<?xml version="1.0" encoding="UTF-8"?>
<java>

 <tips>
  <tip title="Bouts">
<![CDATA[
  Dans ce panneau que vous obtenez des conseils au sujet de la façon jouer avec 
  cette démo, voir d'autres bouts sous chaque étiquette.
]]>
  </tip>
 </tips>

</java>

Note: The above French text are translated from English at http://babelfish.altavista.com, it might not be exact or even correct.

After saving this file, go to the Demo App window, click to focus in the ComboBox labeled Select or Enter Locale, type in fr_FR and press Enter. On success you should see the window changed like below:

The Brief Demo App Window
With French Locale And A Single Tip

Here you can see that partial localization is possible with Meta Facility. Since the brief-demo-note node is missing in Brief_fr.meta, Brief.meta was further consulted for the text to display as the bottom note.

Of course neither Meta Facility nor this tutorial would limit your experiments as with French, try your mother language here!

-~----------~----~----~----~------~----~------~--~-----~--~----~--------

Finally with D:\study\av6\tutorials\examples\tutor\meta\Brief.meta (on MS-Windows™) or /home/compl/study/av6/tutorials/examples/tutor/meta/Brief.meta (on Unix like OS) , you can control which package or class are displayed Bold in the left java tree. Yes, you might have guessed out, that's the localized metatree at bottom of this file. Try modify the structure and nodes here, save the file, and press [Reload MetaBundles].

-~----------~----~----~----~------~----~------~--~-----~--~----~--------

You may play a while here, when finished, proceed to the next page.