Click here to Skip to main content
6,628,952 members and growing! (20,796 online)
Email Password   helpLost your password?
Platforms, Frameworks & Libraries » Mobile Development » Controls     Intermediate License: The GNU General Public License (GPL)

Arabization Controls for Smart Devices

By Hani Gamal

.NET controls to be used for development of Arabic applications for smart devices
C# (C# 2.0, C# 3.0), eVC (eVC 4.0), VC8.0, Win Mobile (PocketPC 2002, WinMobile2003, WinMobile5, WinMobile6), .NET CF, Architect, Dev
Version:3 (See All)
Posted:12 Oct 2008
Updated:11 May 2009
Views:7,870
Bookmarked:8 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
6 votes for this article.
Popularity: 2.65 Rating: 3.40 out of 5
3 votes, 50.0%
1

2

3

4
3 votes, 50.0%
5

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 (GPL)

About the Author

Hani Gamal


Member
Gega Solution is an integrated business solution provider named MAKTABAK.NET
Occupation: President
Company: Gega Solution
Location: Egypt Egypt

Other popular Mobile Development articles:

  • Writing Your Own GPS Applications: Part 2
    In part two of the series, the author of "GPS.NET" teaches developers how to write GPS applications suitable for the real world by mastering GPS precision concepts. Source code includes a working NMEA interpreter and sample high-precision application in C# and VB.NET.
  • Writing Your Own GPS Applications: Part I
    What is it that GPS applications need to be good enough to use for in-car navigation? Also, how does the process of interpreting GPS data actually work? In this three-part series, I will cover both topics and give you the skills you need to write a commercial-grade GPS application.
  • Learn How to Find GPS Location on Any SmartPhone, and Then Make it Relevant
    A step by step tutorial for getting GPS from any SmartPhone, even without GPS built in, and then making location useful.
  • iPhone UI in Windows Mobile
    It's an interface that works with transparency effects. As a sample I used an interface just like the iPhone one. In this tutorial I am explaining how simple is working with transparency on Windows Mobile.
  • Pocket 1945 - A C# .NET CF Shooter
    An article on Pocket PC game development
Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 9 of 9 (Total in Forum: 9) (Refresh)FirstPrevNext
QuestionPlease help me ... Error when registering mArabicCore.dll in windows ce PinmemberA.Ibrahim3:53 22 Jul '09  
GeneralA reference to 'mArabicCore.dll' could not be added. PinmemberA.Ibrahim0:58 20 Jul '09  
GeneralRe: A reference to 'mArabicCore.dll' could not be added. PingroupHani Gamal1:13 20 Jul '09  
GeneralmArabicCore.dll Pinmembergaurav srivastav1:06 11 May '09  
GeneralRe: mArabicCore.dll Pinmemberhanigamal3:43 11 May '09  
Generalwhere is mArabicCore.dll ??????? PinmemberNoOoOor8:15 22 Mar '09  
GeneralRe: where is mArabicCore.dll ??????? Pinmemberhanigamal15:10 15 Apr '09  
GeneralSystem.cf PinmemberDrMazenJamal122:46 9 Jan '09  
QuestionSystem.cf PinmemberDrMazenJamal122:03 9 Jan '09  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 11 May 2009
Editor: Deeksha Shenoy
Copyright 2008 by Hani Gamal
Everything else Copyright © CodeProject, 1999-2009
Web19 | Advertise on the Code Project