Adobe 29180248 User Guide - Page 55

Setting up the folder hierarchy for localized XML files, Formatting XML for language-specific strings

Page 55 highlights

Setting up the folder hierarchy for localized XML files At the same location as your .mxi file, create a folder with the exact name of your .mxi file and append "Resources" to it. For example if you have an .mxi file named "Calendar.mxi", create a folder named "Calendar.mxi_Resources". In this folder, you add an XML file for each language you are localizing the extension into. Each file will have a two-letter ISO language code followed by an underscore character, and then the two-letter ISO country code in upper case. For example, for English you specify "en_US.xml" and for French "fr_FR.xml". If your extension needs to install localized files, you may want to create a subfolder for each of the languages. The folder hierarchy should look as follows: Calendar.mxi - MXI File Calendar.mxi_Resources (folder) en_US.xml - XML File containing English strings fr_FR.xml - XML File containing French Strings en_US (Folder Containing English files) fr_FR (Folder Continaing French files) Formatting XML for language-specific strings The Extension Manager looks up localized strings from XML files that you provide for each language. Each XML file should use Adobe's zstring format. Below is an example of the French xml file. The locale (in this case, "fr_FR") should match the locale of the language. Extension Manager looks up the localized strings based on the name="" attribute and subsitutes the localized strings in the tags. In the following example, we use name_ID for the localized Extension Name, "French Extension Name". And description_ID will be used for the Description displayed when you click the Extension in the Extension Manager. Example French Extension Name French Extension Description. Installing localized files To specify that a set of localized files get installed for a particular language, use the xml:lang attribute on the files tag containing files for that language. Example Creating multilingual extension packages (version 2.1 and later) 55

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66

Creating multilingual extension packages (version 2.1 and later)
55
Setting up the folder hierarchy for localized XML files
At the same location as your .mxi file, create a folder with the exact name of your .mxi file and
append "Resources" to it. For example if you have an .mxi file named "Calendar.mxi", create a
folder named "Calendar.mxi_Resources". In this folder, you add an XML file for each language
you are localizing the extension into. Each file will have a two-letter ISO language code followed
by an underscore character, and then the two-letter ISO country code in upper case. For example,
for English you specify "en_US.xml" and for French "fr_FR.xml".
If your extension needs to install localized files, you may want to create a subfolder for each of the
languages. The folder hierarchy should look as follows:
Calendar.mxi - MXI File
Calendar.mxi_Resources (folder)
en_US.xml - XML File containing English strings
fr_FR.xml - XML File containing French Strings
en_US (Folder Containing English files)
fr_FR (Folder Continaing French files)
Formatting XML for language-specific strings
The Extension Manager looks up localized strings from XML files that you provide for each
language. Each XML file should use Adobe's zstring format. Below is an example of the French
xml file. The locale (in this case,
"fr_FR")
should match the locale of the language. Extension
Manager looks up the localized strings based on the
name=""
attribute and subsitutes the localized
strings in the
<val>
tags. In the following example, we use
name_ID
for the localized Extension
Name, "French Extension Name". And
description_ID
will be used for the Description
displayed when you click the Extension in the Extension Manager.
Example
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<asf locale="fr_FR" version="1.0" xmlns="http://ns.adobe.com/asf">
<set name="DefaultSet">
<str name="name_ID">
<val>French Extension Name</var>
</str>
<str name="description_ID">
<val>
French Extension Description.
</val> </str> </set> </asf>
Installing localized files
To specify that a set of localized files get installed for a particular language, use the
xml:lang
attribute on the
files
tag containing files for that language.
Example
<files xml:lang="en_US">
<file source="en_US/Jacket.htm" destination="$dreamweaver/configuration"/>
</files>
<files xml:lang="fr_FR">