I am using the urdu language for abook. when i enter the details of the book regarding number of pages and the year of publication in urdu digits it is not saved and is also not visible. But if i enter numbers in english language then it is correctly displayed and saved. Thanks
Hello mrizwan,
the page number and year number fields are a numeric fields. They don't accept alphabetic characters.
How to write numbers in urdu language?
These are urdu digits (same like arabic or persian). All are RTL language and use the same numbers like
۱، ۲، ۳، ۴، ۵، ۶، ۷، ۸، ۹، ۱۰ which in english language are (1, 2, 3, 4, 5, 6, 7, 8, 9, 10). Would appreciate your help. Thanks
Hi mrizwan,
if you want insert urdu number to database you must modify the field data types. Are you able to make this change by yourself?
The fields to change are in jos_abbook table. Change the fields "pag" and "year" from INT to VARCHAR.
Thanks for the reply. i made the changes as suggested by you but to no effect. It is neither displayed on the website and neither it is saved. when you save it the value is not saved and field is empty.
You're right, try to change even these files:
<your_site>/components/com_abook/views/book/tmpl/default.php
row 126
from
<?php if ($this->book->pag>0){ ?>
to
<?php if ($this->book->pag!=''){ ?>
row 144
from
<?php if ($this->book->year!=0){ ?>
to
<?php if ($this->book->year!=''){ ?>
<your_site>/administrator/components/com_abook/views/books/tmpl/default.php
row 136
from
<?php $year=$row->year==0?'':$row->year; ?>
to
<?php $year=$row->year==''?'':$row->year; ?>
thanks for your reply. I made the changes as advised. Now the changes are showing up in the control panel and in books. But they are still not being displayed at the website. I appreciate your help. Thank you
The file <your_site>/components/com_abook/views/book/tmpl/default.php shows the book on the front-end side, after the modify you are able to show both pag and year urdu numbers.
Send me the url where you want show the urdu number.
Thanks for the reply. Here is the link. The page number and year are displayed in english. The books not showing the page number and year of publication are those in which i have written urdu numbers
http://nubuwat.org/qadianis/
Hello mrizwan,
what extension are you using in this link? Plugin, component or module? I have difficulty understanding urdu language :-) Are you using the plugin?
Thanks. I solved the problem by installing the joomla plugin gNumber.
On the page i am using loadbook plugin.
ok, but if you want show urdu number without gNumber plugin you have to make the follow changes.
<your_site>/plugins/content/abook_loadbook.php
row 212
from
if ($book->pag!=0){
to
if ($book->pag!=""){
row 230
from
if ($book->year!=0){
to
if ($book->year!=""){
It is now working. Thanks for all of the help. I appreciate it