Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Convert english data of datbase to hindi

894453Oct 14 2011 — edited Jan 17 2012
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 14 2012
Added on Oct 14 2011
15 comments
2,815 views