Click here to Skip to main content
Licence GPL3
First Posted 12 Oct 2008
Views 15,315
Downloads 132
Bookmarked 13 times

Arabization Controls for Smart Devices

By | 11 May 2009 | Article
.NET controls to be used for development of Arabic applications for smart devices.

Introduction

Compact .NET Framework Arabic Enabled Assemblies allow .NET developers to create Arabic enabled applications without using any other external software.

Background

The idea was born while I was working on a Symbol handheld creating shelf prices' checker and labels printing software for Windows CE 5.0. I was required to retrieve, display and print Arabic (Hindi) numbers and context.

Using the Code

This code is a sample code for design-time controls.

This project is complete but it would need some modifications depending on your needs:

/* Sample code for Arabic Button */

using System.Drawing;
using System.Windows.Forms;
using System.Text;

namespace Ar.Controls
{
    public class ArabicButton : System.Windows.Forms.Button
    {
        private bool m_HindiNumerals;
        private string m_LogicalText;
        private bool m_RightToLeft;

        public bool HindiNumerals
        {
            get
            {
		return this.m_HindiNumerals;
            }
            set
            {
		this.m_HindiNumerals = value;
		this.Text = this.m_LogicalText;
            }
        }

        public new bool RightToLeft
        {
            get
            {
		return this.m_RightToLeft;
            }
            set
            {
		this.m_RightToLeft = value;
		this.Text = this.m_LogicalText;
            }
        }

        public new string Text
        {
            get
            {
		return this.m_LogicalText;
            }
            set
            {
		if (value != null)
		{
			this.m_LogicalText = value;
			StringBuilder builder1 = 
				new StringBuilder(this.Text.Length + 1);
			short num1 = (short) this.m_LogicalText.Length;
			ushort[] numArray1 = new ushort[1];
			if (this.m_HindiNumerals)
			{
				numArray1[0] = 1;
			}
			else
			{
				numArray1[0] = 0;
			}
			mArabicCoreWrapper.BuildArabicStringWithLigate
			(this.m_RightToLeft, this.Text, builder1, num1, numArray1);
			base.Text = builder1.ToString();
		}
            }
        }

        public override System.Drawing.Font Font
        {
            get
            {
				return base.Font;
            }
            set
            {
				base.Font = value;
				Invalidate();
            }
        }

        public ArabicButton()
        {
			//this.Font = new Font("Tahoma", 8f, FontStyle.Regular);
			this.m_RightToLeft = true;
			this.m_HindiNumerals = true;
        }
    } // class ArabicButton
}

It was written for compact framework version 2.0, tested on Windows CE 5.0 and Windows Mobile 5.0.

Points of Interest

Arabic is a very complicated and beautiful language. I hope to use this language in programming instead of English.

History

This project started earlier in 2005 and it sure needs some modifications.

  • 11/5/2009: Added mArabicCore in the article attachments

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

About the Author

Hani Gamal

Team Leader
InterMark-GSW
South Africa South Africa

Member

Follow on Twitter Follow on Twitter


Collaborative Group
1 members

http://www.hanigamal.net/about

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Generalthe project has error on compilation, could you please help me PinmemberGeorge abboudeh2:02 12 Jan '10  
GeneralHelp PinmemberMember 68709117:33 30 Nov '09  
QuestionPlease help me ... Error when registering mArabicCore.dll in windows ce PinmemberA.Ibrahim2:53 22 Jul '09  
GeneralA reference to 'mArabicCore.dll' could not be added. PinmemberA.Ibrahim23:58 19 Jul '09  
GeneralRe: A reference to 'mArabicCore.dll' could not be added. PingroupHani Gamal0:13 20 Jul '09  
GeneralRe: A reference to 'mArabicCore.dll' could not be added. PinmemberMember 68709123:35 7 Dec '09  
GeneralmArabicCore.dll Pinmembergaurav srivastav0:06 11 May '09  
GeneralRe: mArabicCore.dll Pinmemberhanigamal2:43 11 May '09  
Questionwhere is mArabicCore.dll ??????? PinmemberNoOoOor7:15 22 Mar '09  
AnswerRe: where is mArabicCore.dll ??????? Pinmemberhanigamal14:10 15 Apr '09  
GeneralSystem.cf PinmemberDrMazenJamal121:46 9 Jan '09  
QuestionSystem.cf PinmemberDrMazenJamal121:03 9 Jan '09  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120528.1 | Last Updated 11 May 2009
Article Copyright 2008 by Hani Gamal
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid