Today in this article, I’m writing for those who want to add Bangla language support to their android application.

Because most of the phones have a Bangla keyboard now.

This project has two different files solaimanlipinormal.ttf & BLS-1.0.jar files. Find the source folder of this project’s source code.

How to build bangla language support android application

Lets Start …….
First Create a Project With the Android Studio Name Amarbangla

After Create Amarbangla Project Simple Create A Folder Assets inflowing this location Amarbanglaappsrcmainassets  Copy and Paste solaimanlipinormal.ttf the font in this Assets Folder

How to build bangla

Now we need to add a bls-1.0.jar in lib folder as a library project Flowing in this location Amarbanglaapplibs

lib

Now open build.gradle file and add the flowing line.

 dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile files('libs/bls-1.0.jar')
    }

Now time Sync Project with Gradle File click to sync the project

gradle
  • Now need to open activity_my.xml. add the flowing line to TextView activity.
  • Now Finally Open MyActivity.java File Write The Flowing Code.
package com.aamsuzon.amarbangla;

import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.widget.TextView;
import androidbangladesh.bengali.support.BengaliUnicodeString;
import android.graphics.Typeface;
public class MyActivity extends Activity {
    String text;
    TextView bnview;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my);
        bnview = (TextView)findViewById(R.id.textview);
        try{
            text = "নিশীথ রাতের নিশী তারা আমি, আমার ঘুম না আসে।n" +
                    "লোহিত শিখার দাবানল মাঝে আমার শরীর ভাসে।n" +
                    "লাল প্রস্তর জ্বলে নিরন্তর আমার বুকের মাঝে।n" +
                    "আমি ম্রিওমান,চাঁদ আম্লান হাসে আকাশের পাশে।n" +
                    "n" +
                    "তুমি আজ সেই চাঁদের আলোয়, হারিয়েছ মোহক্ষণে,n" +
                    "তাই মোর আজ আসে যতো সব নীল গল্প মনে।n" +
                    "ঘুমের আভাবে, কিছুটা স্বভাবে, অবুঝ এ বুক আজ নীলা পাথর জ্বালে।n" +
                    "নীলের শিখাই তবু তুমি এলে সব নিভে যায় জলে।n" +
                    "n" +
                    "কষ্টি পাথর ছিলনা বলে সোনারা যায় সব গলে,n" +
                    "পিতল গ্লাসে তুমি জল খাও, ঘুম যায় তাই চলে।n" +
                    "পাখিদের ডাকে আমার ঘুম আসে,n" +
                    "সন্ধ্যা বেলায়, ঘুম ভেঙ্গে যায় সূর্য মামার ডাকে।n" +
                    "n" +
                    "অঘুমন্ত রাতের এতো কথা যতই লিখি, শেষ হয়না পাতা।n" +
                    "বড়ই কষ্ট এসমস্ত অবুঝ মনের ব্যাথা ।";
            BengaliUnicodeString.getBengaliUTF(MyActivity.this,text,bnview);
            char[] t = text.toCharArray();
            for(int i=0;i "+t[i]);
            }
        }catch(Exception e){

        }
    }

}

Done! Run this project and see the result 🙂 don’t forget to share and write a comment

Bangla language support android application

Download the project:

   git clone      https://github.com/aamsuzon/Amarbanglamaster.git

or it downloads from here

Affiliate Disclaimer : As an Amazon Associate I earn from qualifying purchases.