دلفي تعليم
هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.

ترجمة بعض الجمل باللغة الانجليزية الى اللغة العربية والعكس

اذهب الى الأسفل

ترجمة بعض الجمل باللغة الانجليزية الى اللغة العربية والعكس Empty ترجمة بعض الجمل باللغة الانجليزية الى اللغة العربية والعكس

مُساهمة  djelal 6/5/2020, 1:11 pm


بسم الله الرحمن الرحيم
الصلاة والسلام على رسول الله وعلى آله وأصحابه أجمعين

النص البرنامجي لعمل تطبيق ترجمة بعض الجمل باللغة الانجليزية اللغة العربية والعكس.
عرض ثلاث جمل احداهم تحمل الترجمة الصحيحة.
عرض ثلاث جمل باللغة العربية احداهم تحمل الترجمة الصحيحة للجملة الانجليزية أو العكس.
والبرنامج معمول دلفي Delphi
وهو موجه الى المبرمجين المبتدئين في البرمجة .
أرجو من الاخوة المبرمجين الذين يطلعون عن البرامج ان يعطوني بعض النصائح حول هذا الكود البرماجي
وكذلك اخباري بالاخطاء التي يحتمل ان تكون موجودة في النص البرمجي .
وكذلك أرجو من الاخوة المترجمين اخباري بالاخطاء التي تكون موجودة في ترجمة هذه الجمل.

تحميل المشروع
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط]
تحميل الملف التنفيذي
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط]

النص البرمجي

الكود:


var
  Form1: TForm1;
   intI1,intI2: integer;
  IntA: integer;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  Form1.Font.Charset := ARABIC_CHARSET;
   intI1 := 0;
   intI2 := 0;
  randomize;
  CheckBox1Click(Sender);
 label3.Caption:='عدد الجمل المعروضة '+inttostr(intI1);
 label4.Caption:='عدد شرح الجمل '+inttostr(intI2);
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
if(BitBtn1.Caption=label1.Caption)then
          begin
             BitBtn1.font.Color:=clGreen;
             ShowMessage(label2.Caption);
             BitBtn1.Enabled:=false;
             BitBtn2.Enabled:=false;
             BitBtn3.Enabled:=false;
             BitBtn4.Enabled:=true;
             checkBox1.Enabled:=true;
             intI2:=intI2+1;
          end else begin
             BitBtn1.font.Color:=clRed;
             intI1:=intI1+1;
          end;
end;

procedure TForm1.BitBtn2Click(Sender: TObject);
begin
if(BitBtn2.Caption=label1.Caption)then
          begin
             BitBtn2.font.Color:=clGreen;
             ShowMessage(label2.Caption);
             BitBtn1.Enabled:=false;
             BitBtn2.Enabled:=false;
             BitBtn3.Enabled:=false;
             checkBox1.Enabled:=true;
             BitBtn4.Enabled:=true;
             intI2:=intI2+1;
          end else begin
             BitBtn2.font.Color:=clRed;
             intI1:=intI1+1;
          end;
end;

procedure TForm1.BitBtn3Click(Sender: TObject);
begin
 if(BitBtn3.Caption=label1.Caption)then
          begin
             BitBtn3.font.Color:=clGreen;
             ShowMessage(label2.Caption);
             BitBtn1.Enabled:=false;
             BitBtn2.Enabled:=false;
             BitBtn3.Enabled:=false;
             BitBtn4.Enabled:=true;
             checkBox1.Enabled:=true;
             intI2:=intI2+1;
          end else begin
             BitBtn3.font.Color:=clRed;
             intI1:=intI1+1;
          end;
end;

procedure TForm1.BitBtn4Click(Sender: TObject);
const
 AArab: array[0..46] of String= (
'مرحبا الانجليزية.',
'كيف حالكم؟',
'ما هو اسمك؟ اسمي أحد.',
'كم عمرك؟ 57.',
'من أين أنت؟ جزائري.',
'هل تتكلم اللغة الانجليزية؟ نعم/لا.',
'انظر الى الرجل المستهتر !',
'ولدي جذاب جدا.',
'الاسد خطير جدا',
'عمي محاسب',
'هذا الرجل بناء',
'كنت اتحدث الى صديقي.',
'هو يحب الاناناس.',
'هي تحب ان تأكل العنب.',
'هو يأكل البطيخ.',
'أنت تأكل البطيخ.',
'أنا آكل البطيخ.',
'هذا الرجل يكره الليمون.',
'يعطيني',
'هي تطبخ.',
'هو يقطف.',
'أنا أصنع.',
'المروحة فوق المنضدة.',
'في الأمام من.',
'الساعة فوق الكنبة.',
'الساعة على الحائط.',
'بجوار.',
'تحت الطاولة.',
'المبراة.',
'وراء الاباجورة.',
'بين الكتاب والقلم.',
'هو يرتدي قميص.',
'"صديقي خياط.',
'زي رسمي.',
'بعض المحامين برتدون بدل وبعض المحامين يرتدون بالطو.',
'النحل يصنع العسل.',
'هل هم في البيت؟',
'لماذا هم في البيت؟',
'كيف هم في البيت؟',
'أين أنت؟',
'من هذا؟',
'لمن هؤلاء الكتب ؟',
'هي غضبانة.',
'هو طفل جميل.',
'لمن هؤلاء الكتب ؟',
'هي غضبانة.',
'هو طفل جميل.');

  AEnglish : array[0..45] of String=
('Welcome to English.',
'How are you?',
'What is your name? My name is Ahmed.',
'How old are you? I am 57.',
'Where are you from? I''m Algeria.',
'Do you speak English? Yes/No.',
'Look at the careless man!',
'My baby is very cute.',
'The lion is very dangerous.',
'My uncle is an accountant',
'This man is a builder',
'I was talking to my friend.',
'He likes pineapple.',
'she likes to eat grapes.',
'he eats watermelon.',
'you eat watermelon.',
'I eat watermelon.',
'this men hates lemeon.',
'Give me.',
'she cooks.',
'he picks.',
'I make.',
'The fan is on table.',
'in front of.',
'The clock above the couch.',
'The clock on the wall.',
'Next to.',
'Under the table.',
'The pencil sharpener.',
'behind the lamp.',
'Between the book and the pen.',
'He wears shirt.',
'My friend is a taior.',
'a uniform.',
'some lawyers wear suits and some lawyers wear coats.',
'Bees make honey.',
'Are they at home?',
'Why are they at home?',
'How are they at home?',
'Where are you?',
'Who is this?',
'Whose books are these?',
'She is angry.',
'He is a beautifut child.',' ',' ');
var
  left1,top1: integer;
begin
  IntA := random(45-2);
  if CheckBox1.Checked then begin
    Label2.Caption := AEnglish[ IntA ];
    Label1.Caption := AArab[ IntA ];
    BitBtn1.Caption := AArab[ IntA ];
    BitBtn2.Caption := AArab[ IntA+1 ];
    BitBtn3.Caption := AArab[ IntA+2 ];
  end else begin
  Label2.Caption := AArab[ IntA ];
    Label1.Caption := AEnglish[ IntA ];
    BitBtn1.Caption := AEnglish[ IntA ];
    BitBtn2.Caption := AEnglish[ IntA+1 ];
    BitBtn3.Caption := AEnglish[ IntA+2 ];
  end;
  BitBtn1.Font.Color := clBlue;
  BitBtn2.Font.Color := clBlue;
  BitBtn3.Font.Color := clBlue;
 label3.Caption:='عدد الجمل المعروضة '+inttostr(intI1);
 label4.Caption:='عدد شرح الجمل '+inttostr(intI2);
 left1 := BitBtn1.Left;
 top1  := BitBtn1.Top;
 BitBtn1.Left := BitBtn2.Left;
 BitBtn1.Top := BitBtn2.Top;
 BitBtn2.Left := BitBtn3.Left;
 BitBtn2.Top := BitBtn3.Top;
 BitBtn3.Left := left1;
 BitBtn3.Top := top1;
 BitBtn1.Enabled:=true;
 BitBtn2.Enabled:=true;
 BitBtn3.Enabled:=true;
 BitBtn4.Enabled:=false;
 checkBox1.Enabled:=false;
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
 if(checkBox1.Checked)then begin
             checkBox1.Caption:='عربي';
             BitBtn4.Caption:='التالي';
             BitBtn5.Caption:='خروج';
             self.Caption:='تعلم اللغة الانجليزية';
             intI1:=0;
             intI2:=0;
          end else begin
             checkBox1.Caption:='English';
             BitBtn4.Caption:='Next';
             BitBtn5.Caption:='Exit';
             self.Caption:='Learn English';
             intI1:=0; intI2:=0;
          end;
       checkBox1.Enabled:=false;
end;

procedure TForm1.BitBtn5Click(Sender: TObject);
begin
 close;
end;

end.

djelal
مبرمج مجتهد

عدد المساهمات : 157
تاريخ التسجيل : 29/04/2015

الرجوع الى أعلى الصفحة اذهب الى الأسفل

الرجوع الى أعلى الصفحة

- مواضيع مماثلة

 
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى