Click here to Skip to main content
15,893,722 members
Articles / Programming Languages / C#

Automatically Translate your .NET resource files with Google Translate

Rate me:
Please Sign up or sign in to vote.
4.90/5 (15 votes)
27 Oct 20064 min read 159.7K   3.8K   96  
This article talks about building an application to translate .NET resource files like .resx and .js using Google Translate, for internationalization testing.
MZ����@���	�!�L�!This program cannot be run in DOS mode.

$PEL{
BE�P �i �@ �PiK�x�  H.text�I P `.rsrcx�`@@.reloc�p@B�iH$S,�+B'0*~

}~

}}(
(*0,{,{o
(
*0�s
}s
}s
}s
}s
}s
}s
}	s
}
s
}s
}s
}
s
}(
{(@s
o
{rpo
{@s
o
{o
{rpo
{ �@s
o
{r#po
{ �s
o
{o
{r=po
{(hs
o
{r?po
{Xs
o
{o
{rMpo
{ �hs
o
{ropo
{ �s
o
{o
{r�po
{�s
o 
{ � �s
o
{r�po
{p s
o
{o
{r�po
{�	s
o!
{	 h@s
o
{	r�po
{	8s
o
{	o
{	r�po
{	o"
{	�
s
o!
{
 � �s
o
{
r�po
{
 �s
o
{
o
{
r=po
{( �s
o
{rpo
{`s
o
{o
{r!po
{(s
o
{rCpo
{@s
o
{o
{rQpo
{
o#
{
 �s
o
{
repo
{
 �s
o
{
	o
{
�s
o 
{h �s
o
{rwpo
{ �s
o
{
o
{o$

s
o%
 � �s
(&
('
{o(
('
{
o(
('
{o(
('
{
o(
('
{o(
('
{	o(
('
{o(
('
{o(
('
{o(
('
{o(
('
{o(
()
 � s
(*
 � s
(+
r�p(
r�po
�s
(,
(-
*0s(/
*0{{o0

{
o0
o1
,o1
-r�pr�p(2
&*{rpo
{o3
{o$
�
s4
s5
o6
*0t{
r7prAp�%,'(7
r7p.
rAp.
+(+({r�po
{o3
{o8
{o$
*0;{(9
o:
s;

r7po<
&rApo<
&{
o:
*0{o=
t}*0�{rGpo>
{rOpo?
{r7p(@
,{rkpoA
+{r�poA
{oB
{oC
.{{oD
o
*{r=po
*0{o0

{
o0
sE
oF
r;poG

	oH
�ssI
sJ
oK
&j�4	oK
+joL
y6q6
jXdjZj[i	�7�	(M
&
(N
oO
(

(P
oO

oQ
oR
-��u9,oS
�oT
oU
oV
*tw�0
{o0

{
o0
rSpoW
sX
sY
j	+	jX	oZ
%-�o[
sX

�sj�4
+rjXdjZ	[i
�7�
(M
&o\
&rWpo]
,+o^
�(�rSp(_

+
	o`

oZ
%-�
o[
oa
*07
�>(b
{(c
y>J(d
�

	oe
&�*'+
B0{
o=
t}*0
{o8
*>'����)System.Resources.ResourceReader, mscorlibsSystem.Resources.RuntimeResourceSet, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.mSystem.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089^System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089iSystem.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3apSystem.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]System.String, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089jSystem.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aPADP��X��듄3L�̉��c������V䞛��
�&���q�]�Sl�C���Q+:��P:³eAֺR����ڙP��|�F�Y{���Z��Z����A�S:�eV�	3G�
_��
Q�������wf �-�}�3m�3�^�I�B�NX#1Q���[qd?�0g��r�lyvl��;�;/�1��5<	��f����P�sbR����zc
����LoD
,$this.DefaultModifiers$this.DrawGrid�$this.GridSize�$this.Language}"$this.Localizable%$this.Locked[$this.Name� $this.SnapToGrid� $this.TrayHeight�&$this.TrayLargeIcon�:TranslateBtn.DefaultModifiers	&TranslateBtn.Locked�,TranslateBtn.Modifiers�6fileBrowse.DefaultModifiers	"fileBrowse.Locked
(fileBrowse.ModifiersU
<fileBrowseDlg.DefaultModifiers�
,fileBrowseDlg.Location�.fileBrowseDlg.Modifiers42fileType.DefaultModifiers�fileType.Lockedt
$fileType.Modifiers�
.label1.DefaultModifiersJlabel1.Locked� label1.Modifiers .label2.DefaultModifiers�label2.Locked` label2.Modifiers�.label3.DefaultModifiers6label3.Locked� label3.Modifiers.label4.DefaultModifiers�label4.LockedL label4.Modifiers�>outputFileName.DefaultModifiers"*outputFileName.Locked�0outputFileName.Modifiers�:resxFileName.DefaultModifiers�&resxFileName.Locked8,resxFileName.Modifiersn@translateOption.DefaultModifiers,translateOption.Locked�2translateOption.Modifiers�HtranslationProgress.DefaultModifiers�4translationProgress.Locked$:translationProgress.ModifiersZ����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����System.Booleanm_value����TSystem.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aSystem.Drawing.Sizewidthheight���� System.Globalization.CultureInfo
m_name
m_dataItemm_useUserOverride	cultureIDm_isReadOnlycompareInfotextInfonumInfodateTimeInfocalendar System.Globalization.CompareInfoSystem.Globalization.TextInfo%System.Globalization.NumberFormatInfo'System.Globalization.DateTimeFormatInfoSystem.Globalization.Calendar
�			

 System.Globalization.CompareInfo	win32LCIDcultureSystem.Globalization.TextInfom_nDataItemm_useUserOverride
m_win32LangID�%System.Globalization.NumberFormatInfonumberGroupSizescurrencyGroupSizespercentGroupSizespositiveSignnegativeSignnumberDecimalSeparatornumberGroupSeparatorcurrencyGroupSeparatorcurrencyDecimalSeparatorcurrencySymbolansiCurrencySymbol	nanSymbolpositiveInfinitySymbolnegativeInfinitySymbolpercentDecimalSeparatorpercentGroupSeparator
percentSymbolperMilleSymbol
m_dataItemnumberDecimalDigitscurrencyDecimalDigitscurrencyPositivePatterncurrencyNegativePatternnumberNegativePatternpercentPositivePatternpercentNegativePatternpercentDecimalDigits
isReadOnlym_useUserOverridevalidForParseAsNumbervalidForParseAsCurrency			+	-
.,,
.¤
NaNInfinity	-Infinity	
	%‰�����System.Booleanm_value����System.Booleanm_valueForm1����System.Booleanm_valueP����System.Booleanm_value����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����System.Booleanm_value����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����System.Booleanm_value����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����TSystem.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aSystem.Drawing.Pointxy����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����System.Booleanm_value����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����System.Booleanm_value����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����System.Booleanm_value����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����System.Booleanm_value����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����System.Booleanm_value����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����System.Booleanm_value����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����System.Booleanm_value����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����System.Booleanm_value����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__P����System.Booleanm_value����LSystem, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.CodeDom.MemberAttributesvalue__PBSJBv1.1.4322l #~��	#Strings `#US�#GUID��#BlobW	�3Be
-&
xc�&�&
�c
�c
�c
c
7c
�c���&�������.�G�b�}���������2&
Icn_�_�&
�c�_
ckY�&
�c
c

c
cI8U8����
�c
�c
@cpe�e�e
��
����&
�%�5&;&t&��������	�	&	&A	&^	&?T}T	�$�$�(�,
04(4F7T,_0n$u$|(�;�?��
������P ��C� ��G� ��C	�&��L	�&��P	X'�C�'� P (�+P
D(�PP�(�aC(*�oC@+�{W�+��P�+��	"+?��������	��i�\q�\y�G��\��\��\��\��\��\��\��\��\�94�CY�C�G)�CA�C1�C9�CI�CQ�C�QC��j�tp��\��j��v����\��
1�|��|���1��(G4vJv�k�	x�|G�v�v�|��G�C��������!'��,G9�
A��A\C�b�QmI��Y��Q�CQx�Y��a�\a\��a%\a0iM�aX�q�Cq|\y�������\��\��������D��N��W��_�k��C��C��C��C��;��\��\�����C�����@��E��L��\��C�/	p	F	yIL	�h	�.;�.c�.�.�.3�.�.C�.K�.S�.[�s����S���	�T��c�&�a_�	�w�et	<Module>ResxTranslator.exemscorlibSystemMulticastDelegateShowProgressDelegateResxTranslatorSystem.Windows.FormsFormForm1.ctorInvokeIAsyncResultAsyncCallbackBeginInvokeEndInvokeLabellabel1label2ComboBoxtranslateOptionButtonTranslateBtnTextBoxresxFileNamelangPairSelectedfiletypeChoiceOpenFileDialogfileBrowseDlgfileBrowseoutputFileNamelabel3label4fileTypeProgressBartranslationProgressSystem.ComponentModelContainercomponentsDisposeInitializeComponentMainEventArgsTranslateBtn_ClickTranslateInThreadForm1_LoadtranslateOption_SelectedIndexChangedfileBrowse_ClickTranslateResxTranslateJSTranslateStringfileType_SelectedIndexChangedShowProgressSystem.ReflectionAssemblyKeyNameAttributeAssemblyKeyFileAttributeAssemblyDelaySignAttributeAssemblyVersionAttributeAssemblyCultureAttributeAssemblyTrademarkAttributeAssemblyCopyrightAttributeAssemblyProductAttributeAssemblyCompanyAttributeAssemblyConfigurationAttributeAssemblyDescriptionAttributeAssemblyTitleAttributeobjectmethodpercentTranslatedcallbackresultStringEmptydisposingControlSuspendLayoutSystem.DrawingPointset_Locationset_NameSizeset_Sizeset_TabIndexset_TextEventHandleradd_SelectedIndexChangedadd_ClickButtonBaseContentAlignmentset_TextAlignComboBoxStyleset_DropDownStyleset_Visibleset_AutoScaleBaseSizeset_ClientSizeControlCollectionget_ControlsAddset_MaximizeBoxset_MaximumSizeset_MinimumSizeadd_LoadResumeLayoutSTAThreadAttributeApplicationRunsendereget_Textget_LengthMessageBoxDialogResultIWin32WindowShowset_EnabledSystem.ThreadingThreadStartThreadStartIsInternedset_ValueWebWagonHttpUtilsTranslateUtilSystem.CollectionsArrayListGetLangPairsListControlset_DataSourceget_SelectedValueFileDialogset_InitialDirectoryset_Titleop_Equalityset_Filterset_FilterIndexCommonDialogShowDialogget_FileNameSystem.XmlXmlDocumentLoadXmlNodeXmlNodeListSelectNodesget_CountSystem.ResourcesResXResourceReaderResXResourceWriterIDictionaryEnumeratorGetEnumeratorObjectIEnumeratorget_CurrentDictionaryEntryInt32Delegateget_ValueToStringget_KeyAddResourceMoveNextIDisposableGenerateCloseToCharArraySystem.IOStreamReaderStreamWriterTextReaderReadLineTrimStartsWithSplitJoinTextWriterWriteLineinputstringLangPairTypeRuntimeTypeHandleGetTypeFromHandleEnumParseGetTranslatedTextExceptionget_MessageResxTranslator.Form1.resources
label1File NameresxFileName
label2!Translate OptiontranslateOptioncomboBox1TranslateBtnTranslatefileBrowse
BrowseoutputFileName
label3!Output file Name
label4File TypefileType'translationProgressForm1KEnter the input and output file namesIncomplete DataTranslating ...	resxjsC:\Select a FilegResource Files|*.resx|XML Files|*.xml|All Files|*.*gJavaScript String Resource Files|*.js|All Files|*.*//root/data"var��+^��B��hb�<�K�z\V4�   
 
!%)-   1  �?_�
:  m q u } �� �� i	  
���� ������  ��  �� �� �� ��  "��������
������   ����
��
�������
���	xi�i �i_CorExeMainmscoree.dll�% @(�H�`�x����������@��(�(P�"�$$4VS_VERSION_INFO���酻	酻	?DVarFileInfo$Translation��StringFileInfo`000004b0Comments $CompanyName ,FileDescription @FileVersion1.0.2491.34281HInternalNameResxTranslator.exe(LegalCopyright ,LegalTrademarks POriginalFilenameResxTranslator.exe$ProductName DProductVersion1.0.2491.34281HAssembly Version1.0.2491.34281( @����������������������������wwwwwwwwwwwwwwpDDDDDDDDDDDDDDp��������������p��������������p��������������p��������������p��������������p��������������p��������������p��������������p��������������p��������������p��������������p��������������p��������������p��������������p��������������p��������������p��������������p��������������p��������������pDDDDDDDDDDDDDDpLLLLLLLLLN��Itp��������������DDDDDDDDDDDDD@�����������������������������������������������������( ����������������������������wwwwwwwDDDDDDDGO������GO������GO������GO������GO������GO������GO������GO������GH������GL������G�DDDDDD��������  �(`�9

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
India India
Satish is an application developer working on many different technologies, VC6, VBA, CORBA, XML, ASP, ASP.NET and recently experimenting with C#. He has started looking into building rich UIs using flash, php, asp & javascript too.

Comments and Discussions