By neel on
Hello,
I am tring to make a translation for Marathi. its all ok but, I am not able to translate digits in Marathi. thay are still in English.
How to do this?
for example I want to change this in Marathi digit 03/22/2007 - 17:02 .
how to do this? tell me a specific module which handle this digits.
bye.
Comments
format
How would this date look in Marathi?
I believe you still got same digits - 1 is 1, not?
If yes, then it's all about date formats here, it will require some hacking.
I would also like to create a date format for Latvian, and in this case it would be 22.3.2007.
We can figure it out. I'll look into it in a moment.
there are different signs for digit in Marathi than English.
Hello ,
There are some different signs for digit in Marathi than English. Only common digit is 0 and I want all other should display in Marathi.
I am giving them below.
१ २ ३ ४ ५ ६ ७ ८ ९ ०
thanks
huh
Well, this should be submitted as a feature request against Drupal's locale module. There is no way now to do this, and there are many places, where digits are used, eg. in places where counts of objects are displayed: "14 new comments" for example. I don't see an immediate simple method to solve this, but you probably have a good idea.
but one is using this now.
hello,
I know one site which is using this feacher. How is this possible?
did you find a solution to
Did you find a solution to this?
Or, has this been added as a feature in Drupal 6?
In case someone else hits
In case someone else hits this URL....
Found a solution, based on
http://blog.muktosource.com/bdhacker/drupal-translate-digits-into-your-l...
Added below block at the end of
function t($string, $args = array(), $langcode = NULL)
in DRUPAL_INSTALL_DIR/includes/common.inc
if($langcode == 'hi'){
return hindiDigit(strtr($string, $args));
}else{
return strtr($string, $args);
}
and defined below function at the end
function hindiDigit($numb){
// Credits: Hasan Raihan
$latin = array('1','2','3','4','5','6','7','8','9','0');
$hindi = array('१','२','३','४','५','६','७','८','९','०');
return str_replace($latin, $hindi, $numb);
}
Should this not be added as a feature?
PS: I am sure we can have a proper i18n solution based on strings, but I am new to both PHP and Drupal and I wait for a more skilled person's inputs. Any help would be appreciated.
Required for drupal 7
How it can be implemented with d7. Or advise if here have any module developed to do the same.