Changes between Version 11 and Version 12 of Internationalization


Ignore:
Timestamp:
Mar 21, 2012, 12:33:46 PM (10 years ago)
Author:
Michael Schäfer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Internationalization

    v11 v12  
    2828[[Image(createResourceFile.png)]]
    2929
    30 In case a resource file should be used it needs to be announced to the CrypCore. This is done via the [https://www.cryptool.org/trac/CrypTool2/wiki/AttributeUsage#PluginInfoAttribute PluginInfoAttribute] through the first and optional parameter. A good way to get your resource file is described at the beginning of the section [https://www.cryptool.org/trac/CrypTool2/wiki/Internationalization#ExternalizingstringsfromXAML Externalizing strings from XAML]. Get your RESOURCECLASSPATH and paste it in front of the other parameters of your plugin’s PluginInfoAttribute. In case of ArrayIndexer it is done in the following way and it will look alike for your plugin:
     30In case a resource file should be used it needs to be announced to the CrypCore. This is done via the [https://www.cryptool.org/trac/CrypTool2/wiki/AttributeUsage#PluginInfoAttribute PluginInfoAttribute] through the first and optional parameter resourceFile. In case of ArrayIndexer resourceFile is "ArrayIndexer.Properties.Resources". The full path would be "Cryptool.Plugins.ArrayIndexer.Properties.Resources". But since the code runs within the "Cryptool.Plugins.ArrayIndexer" namespace, "ArrayIndexer.Properties.Resources" resolves to the same path. The following code block shows ArrayIndexer's PluginInfoAttribute to give an example on how it will look like.
     31
    3132{{{
    3233[PluginInfo("ArrayIndexer.Properties.Resources", "PluginCaption", "PluginTooltip", "ArrayIndexer/DetailedDescription/doc.xml", "ArrayIndexer/arrayindexer.png")]
    3334}}}
    34 The full path in case of the ArrayIndexer plugin would be Cryptool.Plugins.ArrayIndexer.Properties.Resources. But since the code runs within the Cryptool.Plugins.ArrayIndexer namespace, ArrayIndexer.Properties.Resources resolves to the same path.
     35
     36For your plugin it will probably be "PROJECTNAME.Properties.Resources", where PROJECTNAME is the name you have chosen at the creaton of your projekt. So get your path and paste it in front of the other parameters of your plugin’s PluginInfoAttribute. If the this way doesn't work for you a good way to get the path is described at the beginning of the section [https://www.cryptool.org/trac/CrypTool2/wiki/Internationalization#ExternalizingstringsfromXAML Externalizing strings from XAML].
    3537
    3638Now you need to externalize three things: