Examples, translation: allow to select any of available translations, patch by wp, bug #29662

git-svn-id: trunk@51654 -
This commit is contained in:
maxim 2016-02-18 06:47:04 +00:00
parent c2748fe332
commit beeb532fc5
3 changed files with 27 additions and 10 deletions

View File

@ -126,6 +126,7 @@ begin
'fi' : Result := $040B; // Finnish 'fi' : Result := $040B; // Finnish
'fr' : Result := $040C; // French 'fr' : Result := $040C; // French
'he' : Result := $040D; // Hebrew 'he' : Result := $040D; // Hebrew
'hu' : Result := $040E; // Hungarian
'it' : Result := $0410; // Italian 'it' : Result := $0410; // Italian
'jp' : Result := $0411; // Japanese 'jp' : Result := $0411; // Japanese
'pl' : Result := $0415; // Polish 'pl' : Result := $0415; // Polish

View File

@ -9,26 +9,28 @@ inherited MainForm: TMainForm
OnCreate = FormCreate OnCreate = FormCreate
object Label1: TLabel[0] object Label1: TLabel[0]
Left = 14 Left = 14
Height = 13 Height = 15
Top = 16 Top = 16
Width = 76 Width = 83
Caption = 'Select language' Caption = 'Select language'
FocusControl = CbLanguage FocusControl = CbLanguage
ParentColor = False ParentColor = False
end end
object CbLanguage: TComboBox[1] object CbLanguage: TComboBox[1]
Left = 136 Left = 136
Height = 21 Height = 23
Top = 13 Top = 13
Width = 100 Width = 100
ItemHeight = 13 ItemHeight = 15
Items.Strings = ( Items.Strings = (
'de - Deutsch' 'de - deutsch'
'en - English' 'en - English'
'es - Español' 'es - Español'
'fr - Français' 'fr - Français'
'he - Hebrew' 'he - Hebrew'
'ru - Russian' 'hu - magyar'
'it - Italiano'
'ru - русский'
) )
OnChange = CbLanguageChange OnChange = CbLanguageChange
Style = csDropDownList Style = csDropDownList
@ -57,7 +59,7 @@ inherited MainForm: TMainForm
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 79 ClientHeight = 77
ClientWidth = 214 ClientWidth = 214
Items.Strings = ( Items.Strings = (
'beer' 'beer'
@ -85,9 +87,9 @@ inherited MainForm: TMainForm
end end
object LblCurrentSelection: TLabel[6] object LblCurrentSelection: TLabel[6]
Left = 18 Left = 18
Height = 13 Height = 15
Top = 154 Top = 154
Width = 86 Width = 95
Caption = 'No drink selected.' Caption = 'No drink selected.'
ParentColor = False ParentColor = False
end end

View File

@ -37,7 +37,7 @@
</CodeGeneration> </CodeGeneration>
<Linking> <Linking>
<Debugging> <Debugging>
<StripSymbols Value="True"/> <GenerateDebugInfo Value="False"/>
</Debugging> </Debugging>
<LinkSmart Value="True"/> <LinkSmart Value="True"/>
<Options> <Options>
@ -81,6 +81,7 @@
<ComponentName Value="LocalizedForm"/> <ComponentName Value="LocalizedForm"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="LocalizedForms"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
<Filename Value="unit2.pas"/> <Filename Value="unit2.pas"/>
@ -88,6 +89,7 @@
<ComponentName Value="Form2"/> <ComponentName Value="Form2"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="Unit2"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="stringsunit.pas"/> <Filename Value="stringsunit.pas"/>
@ -105,8 +107,20 @@
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="units\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="units\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing>
<SyntaxOptions>
<IncludeAssertionCode Value="True"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration> <CodeGeneration>
<SmartLinkUnit Value="True"/> <SmartLinkUnit Value="True"/>
<Checks>
<IOChecks Value="True"/>
<RangeChecks Value="True"/>
<OverflowChecks Value="True"/>
<StackChecks Value="True"/>
</Checks>
<VerifyObjMethodCallValidity Value="True"/>
</CodeGeneration> </CodeGeneration>
<Linking> <Linking>
<Options> <Options>