Archive for the ‘ bangla ’ Category

Virtual Bangla keyboard for facebook Application

So now we can write bnagla in Facebook by Virtual keyboard. Here is the demo application of virtual keyboard

http://apps.facebook.com/banglakeyboard/

After seeing the virtual keyboard(vc) from the hasin bhai blog, I have planned to do that in facebook application. But I hear that it can be used by iframe. So I think to do that in FBJS as a result it will be easily integrated in any facebook application. So work on the I have done the Virtual application by FBJS. Thanks Allah to do that very exciting work.

Also thanks hasin bhai to encourage me and Anis bhai, Emran Hasan who helped me lot to complete that.

You can see the demo here : http://apps.facebook.com/banglakeyboard/

After doing that I learn some beauty of FBJS .The next I will share the challenges I have faced to do that in fbjs .

Note : If you do not see the bangla  font  then you have to install the unicode, you can follow the instruction from there :

http://www.somewhereinblog.net/banglasettings

Bangla insert and retrive using php & mysql

Lets see how to insert and retrive banlga font into the Mysql Database using PHP. We see the step for that.

  • First we Create a MySql database and tables which supports Bangla.
  • Insert Bangla value in the database .
  • Retrieve Bangla from the database.
    • Create Database to support Bangla :
      We give the database name bangla and it has 1 table which name is profile .We do that by phpMyadmin :

    • To create the database set character utf8_general_ci.
    • database_create.jpg

    • db_table1.jpg
    • db_field-1.jpg
      To keep things simple and easy to understand open the mysql command
      prompt.

    • mysql> set names ‘utf8′;
    • mysql> create database bangla character set utf8 collate utf8_general_ci;
    • mysql> use bangla;
    • mysql> create table profile (profile_name varchar(100) character set utf8 collate utf8_general_ci);

    Insert Bangla :
    So we create a database. Now we insert the value into the database. Insert Bangla Value in the database :
    We create a simple form :

    Input Form

    bangla-type.jpg

    Then we will insert into the database :

    We create a coonection .

    1. $c = mysql_connect(“localhost”,”root”,””);
    2. mysql_select_db(‘bangla’) or die (mysql_error());
    //******These two line are used for Bangla Character *********/
    3. mysql_query(‘SET CHARACTER SET utf8’);
    4. mysql_query(“SET SESSION collation_connection =’utf8_general_ci'”) or die (mysql_error());

    //***************************************************/
    You must add these two lines just after selecting the database, i.e mysql_select_db() function.
    mysql_query(’SET CHARACTER SET utf8′);
    mysql_query(”SET SESSION collation_connection =’utf8_general_ci’”);

    If you want to see more details then look at here (http://hasin.wordpress.com/2006/07/18/storing-bangla-unicode-text-in-mysql-database/)

    Now we will insert :
    if(isset($_POST))
    {
    mysql_query(“insert into profile values($_POST[“username])) or die (mysql_error());
    echo ‘saved into database’;
    }
    else
    {
    echo ‘Not posted’;
    }

    Now we check how the font stores into the database .
    db_record.jpg
    Retrieve Bangla from the database:
    The display is as simple as retrieve other database.

    $res = mysql_query(“select * from profile”,$c);
    echo “
    Display resrult from database
    “;
    echo “————————“;
    while($row = mysql_fetch_array($res))
    {
    echo $row[‘profile_name’] .’
    ‘;
    }
    echo “————————“;
    db_result.jpg

    Now one of the thing is how you write bangla in the webpage
    I fyou have no font please download the free software

    Avro software
    http://www.omicronlab.com/avro-keyboard-download.html

    Dear God-Thanks for Giving me yesterday