Changes between Version 5 and Version 6 of Internationalization


Ignore:
Timestamp:
Feb 6, 2011, 7:47:21 PM (11 years ago)
Author:
Sven Rech
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Internationalization

    v5 v6  
    1111It includes some very useful functions for internationalizing as you will see.
    1212
    13 == Externalizing your strings ==
     13== Externalizing strings ==
    1414
    1515First you have to externalize all the strings in your project that you want to translate.
     
    138138
    139139== Translating the resource file ==
    140 TODO
     140When you externalized all strings, you can start translating them.
     141Let's assume that your resources file is located in Properties -> Resources.resx:
     142
     143[[Image(translating1.png)]]
     144
     145Copy the Resources.resx file and paste it into the properties "directory" again (You have to use CTRL+C and CTRL+V for this).
     146Now rename the copy to "Resources.de-DE.resx". This will be the resourcefile for the german translation:
     147
     148[[Image(translating2.png)]]
     149
     150Open this new file. But not by simply clicking on it, but by pressing F7. This opens the resource file in a code view.
     151Scroll down and you will see all strings to translate. Those strings that aren't translated yet are shown gray by ReSharper.
     152
     153Now simply translate all the strings.
     154
     155=== Adding new strings afterwards ===
     156When you already translated your plugin project, but added new strings to it and externalize them, you will have the problem, that entries for them only exist in the Resources.resx, but not yet in the Resources.de-DE.resx.
     157
     158Of course, you can simply copy them over by hand. But ReSharper gives you a much more convenient possibility:
     159Open Resources.resx in code mode (i.e. by pressing F7) and scroll to the new externalized string.
     160
     161[[Image(translating3.png)]]
     162
     163As you can see, ReSharper underlines all entries that are not overriden in the german resource file.
     164
     165Now press ALT+Return, which will open the ReSharper menu. Choose "Override X in German"
     166
     167[[Image(translating4.png)]]
     168
     169Now you have the corresponding entry in the german resource file.