XML/SWF Charts| CSS/XML Timeline Eons(New)| Timeline Eons| SlickBoard

 < previousnext > 

 

Multilanguage Text

 

To display special characters or languages other than English:

1. Type the special characters in the XML source file and apply a font to it that can display the characters:

<chart>

   <chart_data>
      <row>
         <null/>
         <string>special_text</string>
         <string>special_text</string>
      </row>
      <row>
         <string>special_text</string>
         <number>5</number>
         <number>10</number>
      </row>
   </chart_data>

   <draw>
      <text font='special_font'>special_text</text>   
   </draw>

   <axis_category font='special_font' />
   <legend font='special_font' />

</chart>

Replace special_font with the name of a font that can display the special characters (this must be a font other than Arial). Replace special_text with the text containing the special characters. The special characters must appear correctly here. Example:

<chart>

   <chart_data>
      <row>
         <null/>
         <string></string>
         <string></string>
      </row>
      <row>
         <string>中国</string>
         <number>5</number>
         <number>10</number>
      </row>
   </chart_data>

   <draw>
      <text font='Hei'>中国</text>                    
   </draw>

   <axis_category font='Hei' />
   <legend font='Hei' />

</chart>

 

2. Save the XML source file as plain text with UTF-8 encoding. When saving the file, examine the saving options that the text editor offers. There should be a checkbox to make the file UTF-8. If your text editor does not provide this option, then use a different text editor.

If you are building the XML source dynamically with a script, encode variables that have special characters to UTF-8. This is a PHP example:

<string><?php utf8_encode( $label ); ?></string>

 

3. View the chart on a machine with the special font installed:

 


Embedding New Fonts

See this page for information about embedding new fonts that display special characters and multi-languages.

 

 

 < previousnext > 


Copyright © 2003-2017, maani.us