NAME Yandex::Translate - An Api, simple, for Yandex translate VERSION version 0.02 SYNOPSIS use Yandex::Translate; my $tr = Yandex::Translate->new; #Set your yandex api key that you can get from https://tech.yandex.com/ $tr->set_key("yandex_key"); #Set the text that you want to translate $tr->set_text('In the name of God'); #set the source lang $tr->set_from_lang('en'); #set the dist lang (xx means whater you want) $tr->set_to_lang('xx'); #Get the result print $tr->translate(); DESCRIPTION Yandex.Translate (previously Yandex.Translation) is a web service provided by Yandex intended for the translation of text or web pages into another language. The service uses a self-learning statistical machine translation, developed by Yandex. The system constructs the dictionary of correspondences based on the analysis of millions of translated texts. METHODS new $tr = Yandex->Translate->new( %attributes ); This constructor return a new Yandex::Translate object, optionel attributes include: * key -- Key Api that you can get from yandex website after register, string format * text -- Text that you want to translate, strring format. * from_lang -- The source lang, string format. * to_lang -- the distination lang, string lang. set_key $tr->set_key( 'yandex_key' ); This method can help you to pass api key (string), instead of passing in 'new' you can define an oject without any attributes. set_text $tr->set_text( 'text_to_translate' ); This method is used to pass your text to translate (string). set_from_lang $tr->set_from_lang( 'en' ); This method is used to pass your source lang (string) from example english => 'en'. set_to_lang $tr->set_to_lang( 'xx' ); This method is used to pass your destination lang (string) from example arabic => 'ar'. translate print $tr->translate(); This method is used to get the text translated, It returns a string. detect_lang print $tr->detect_lang(); This method is used to detect a language of the text, It returns a string. get_langs_list print $tr->get_langs_list(); This method is used to get the list of supported languages, It returns a string. SEE ALSO For more info please visit Yandex https://translate.yandex.com/developers SUPPORT Bugs / Feature Requests Please report any bugs or feature requests on my email. Source Code This is open source software. The code repository is available for public review and contribution under the terms of the license. AUTHORS * James Axl COPYRIGHT AND LICENSE This software is copyleft (c) 2017 by James Axl. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.