Convert english data of datbase to hindi
894453Oct 14 2011 — edited Jan 17 2012I have created a function in Databse to retireve data in hindi, becuase my requirement is to print the data in Hindi although it is stored in english in Database.
But the problem is when I execute this function it returns null...
can please any one help me out in this case
function is
create or replace
function TranslateToHindi( sentence varchar2 ) return varchar2 is
buffer clob;
line varchar2(32767);
i1 integer;
i2 integer;
begin
buffer := regexp_substr(('http://translate.google.co.za/translate_t?hl==UTF-8=~'||replace(sentence,' ','+')||'~=en=hi#'),'".*?"' ,1,3);
i1 := instr( buffer, '<textarea name=utrans' );
line := substr( buffer, i1, 1000 );
i1 := instr( line, '~', 1 ) +1;
i2 := instr( line, '~', -1 ) -1;
-- returns the translated sentence
return(
trim( substr( line, i1, i2-i1 ) )
);
end;
execution statement
select TranslateToFrench( 'sujit mishra') from dual;
output : null
plz help me out if possible because this is very important requirement....... and needs to be fulfilled via Oracle itself
Edited by: 891450 on Oct 13, 2011 11:32 PM