Changes between Version 4 and Version 5 of Internationalization


Ignore:
Timestamp:
Feb 5, 2011, 1:31:01 PM (11 years ago)
Author:
Sven Rech
Comment:

Minor layout changes

Legend:

Unmodified
Added
Removed
Modified
  • Internationalization

    v4 v5  
    2525If you don't already have one (which is the case for must plugin projects), you can create one by going to you project properties and choose the tab "Resources" on the left side.
    2626Than click on the appearing label to generate you resource file.
     27
    2728[[Image(createResourceFile.png)]]
    2829
     
    3839
    3940For instance, I want to externalize the following string from the RSA class (I know I just said, that externalizing GuiLogMessages is not needed, but this is a very good example anyway):
     41
    4042[[Image(codeExt1.png)]]
    4143
     
    5052
    5153After that, we can externalize the string. Move your cursor over the string. Then simply press Ctrl+Shift+R. The following should happen:
     54
    5255[[Image(codeExt2.png)]]
    5356
    5457Press enter (to choose the "Move to Resource..." feature). A ReSharper Dialog will open now:
     58
    5559[[Image(codeExt3.png)]]
    5660
     
    6973
    7074First you have to find out, in which namespace you resource class lies. You can do this by opening the Resources.Designer.cs class and take a look:
     75
    7176[[Image(XAMLExt1.png)]]
    7277
     
    8287}}}
    8388Here, you should replace RESOURCECLASSPATH by the above obtained resource class path:
     89
    8490[[Image(XAMLExt2.png)]]
    8591
     
    8793
    8894Lets assume you want to externalize the following text attribute:
     95
    8996[[Image(XAMLExt3.png)]]
    9097
     
    96103So you have to create a new entry in your resource file with the key "Encryption" and the value "Encryption" (of course again you must take care that your key does not contain special characters. So when externalizing the string "Hello World", the key can be named something like "Hello_World")
    97104You can do this by opening your project settings and clicking the "Resources" tab. It shows you all entries. Simply add your new one:
     105
    98106[[Image(XAMLExt4.png)]]
    99107
     
    114122
    115123Consequently, you have to add two new entries into your resource file:
     124
    116125[[Image(MetaExt1.png)]]
    117126
    118127Now you can replace all other meta information strings with resource keys.
    119128For instance, if we want to externalize the name and description of the InputText plugin input:
     129
    120130[[Image(MetaExt2.png)]]
    121131