Bangla date as a PHP class

I have worked with Bangla date a long time ago. The first initiative was to make a extension for forum engine punBB. After that, i made a javascript widget to display Bangla date in any site. The third initiative was to make a facebook application that shows current Bangla date to your facebook profile.

I always wanted to publish this as a PHP Class but never got that chance to do so. After a long time i worked with Bangla date today and finally created a PHP Class to use it anywhere by anyone. Sorry for the late.

Usage:

<?php
include_once 'class.banglaDate.php';
$bn_date = new BanglaDate(time());
$date = $bn_date->get_date();
?>

You will get an array of converted date in Bangla.

A few things needed to know. Bangla date counted or changes after the sun rise. That means, where English date changes at 12′O clock at the night, Bangla date changes at the morning after the sunrise.

Class Constructor:
This class constructor has 2 parameters. The first one in timestamp and the second one is the hour of changing the date. If you want to change the Bangla date like English at 12’0 clock at the night, you should use $bn_date = new BanglaDate(time(), 0). But if you want to change the date at 6′O clock at the morning, use as $bn_date = new BanglaDate(time(), 6). If you don’t pass the second parameter, the default value is 6. Use as you like.

After Creating the class object, you can set another date using set_time() like $bn_date->set_time(time(), 4);

Bangla Date class on PHPClasses.org

বাংলা তারিখ ভুলে যান? আর ভোলার চান্স নাই

বাংলা তারিখ নিয়ে প্রথমে কাজ করেছিলাম প্রজন্ম ফোরামের জন্যে। সেখানে হেডারে প্রতিদিনের বাংলা তারিখ দেখানো হয়। এরপর করলাম একটা জাভাস্ক্রিপ্ট উইজেট, যেটা দিয়ে আপনি আপনার যেকোন সাইটে বাংলা তারিখ যুক্ত করতে পারেন। অনেকদিন ধরেই চিন্তা করছিলাম ফেসবুকের জন্যে একটা অ্যাপ্লিকেশন বানালে মন্দ হয় না, কিন্তু সময় আর করে উঠতে পারিনি।

ফেসবুকে বাংলা তারিখ

ফেসবুকে বাংলা তারিখ

এই অ্যাপ্লিকেশন দিয়ে আপনি আপনার ফেসবুকের প্রোফাইলে আজকের বাংলা তারিখটি দেখাতে পারবেন। অ্যাপ্লিকেশনটি রয়েছে এখানে http://apps.facebook.com/bangladate/

Google Transliteration plugin for WordPress & punBB

What is Google Transliterate?

Google offers an automatic transliteration option that converts Roman characters to the characters used in Arabic, Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Nepali, Punjabi, Tamil, Telugu and Urdu. This feature lets you type these languages phonetically in English letters, but they’ll appear in their correct alphabet. Keep in mind that transliteration is different from translation; the sound of the words is converted from one alphabet to the other, not the meaning.

What I did?
I did a integration of Google Transliterate with WordPress & punBB. My plugin allows you to write phonetically with the help of Google Transliteration in the WordPress post editor and also in punBB post box. This will not work in rich text editor mode in wordpress, you need to switch on HTML mode.

How does it work?
The bellow images tells you everything

  • You can select your desired language from the list
  • transliterate

  • After Selecting the language, active the google transliteration option by clicking the text.
  • transliterate1

  • Type the words phonetically. Once you type a space or a punctuation mark, the letters will be converted to corresponding language characters, like this:
  • transliterate2transliterate3

  • If you need to correct a transliterated word, click the word; you’ll see a menu of alternate spellings, in addition to an option to switch back to the Roman characters you typed. If you type the same word again, it will then be transliterated correctly based on your saved preference. transliterate4
Download Google Tranliteration for Wordpress (184)
Download Google Tranliteration for punBB (173)

punBB 1.3.2 extension: Bangla Date (বঙ্গাব্দ)

বাংলা আমাদের মাতৃভাষা। এই ভাষার জন্যে আমরা যুদ্ধ করেছি। কিন্তু বাঙালী হলেও আমরা অধিকাংশ লোকই জানিনা আজকে বাংলা কত তারিখ। তাই আজকে জনপ্রিয় ফোরাম ইঞ্জিন পানবিবি’র জন্যে একটা এক্সটেনশন বানালাম। এই এক্সটেনশন আপাতত ব্যবহার করা হচ্ছে একটি অত্যন্ত জনপ্রিয় বাংলা ফোরাম প্রজন্মতে। ডিফল্টভাবে এটি ফোরামের Description এর সোজা ডানদিকে প্রদর্শিত হয়। নিচের স্ক্রিনশট দেখুন

bangla-date1

এটি প্রতিদিনের বাংলা তারিখ ফোরামের header এ দেখায়। সামনে পহেলা বৈশাখ আসছে, সে উপলক্ষ্যে এটি রিলিজ দেয়া হল। আসলে এই এক্সটেনশনের আইডিয়াটি ছিল রাজু ভাইয়ের। তিনি আমাকে বলাতে আমি এই এক্সটেনশনটি বানিয়েছি। ধন্যবাদ রাজু ভাইকে।

আপডেট(২৯ এপ্রিল): আজ এর নতুন ভার্সন ১.২ রিলিজ দিলাম। আগের ভার্সনে কিছু বাগ ছিল। যেমনঃ ঐটার সাল নিয়ে একটু ঝামেলা হচ্ছিল। ঠিক মত আপডেট হচ্ছিল না। তাই এর নতুন ভার্সনে এটা ঠিক করে দেয়া হয়েছে।

আরেকটা নতুন ফিচার যুক্ত করা হয়েছে। যেহেতু বাংলা তারিখ গণনা করা হয় সূর্যোদয় থেকে, তাই নতুন ভার্সনে সকাল ৬ টা থেকে তারিখ পরিবর্তিত হবে। অর্থাৎ রাত ১২ টার পরিবর্তে সকাল ৬ টা থেকে তারিখ পরিবর্তিত হবে।


punBB 1.3.2 Final Bangla Language Pack

From one of my previous post, i told you that i’ve worked with punBB Bangla language pack for the version 1.3 RC. Now the full version of punBB 1.3.2 has released and my language pack is also ready for this. You can download the language pack from here. This Bangla language pack is only for the user interface only. I didn’t translate the admin section. So, enjoy it… :)

Download punBB 1.3.2 Bangla Language Pack (310)

Ubuntu’s problem solve is in PDF now

In my linux category, i have some posts about ubuntu. It was about the solve of ubuntu problems, what are very terrible to the new comers to Ubuntu. Now i’ve combined them as a pdf file. You can download the file from here. Happy free life :) .

Tags: , , ,

PunBB Bangla Language Pack

Few months ago i have worked with PunBB. PunBB is a forum engine and it is very fast and also light-weight. I have translated the language pack to Bangla. It is 1.3 RC1. This punBB version is in Release candidate list. It will be in stable version in a few days ( i guess). In this punBB 1.3 RC1 version, the interface is attractive with respect to 1.2 version. I hope i can deliver the latest update for this forum engine.

Tags: , ,