将furigana添加到网站内容
问题描述:
我需要为我的日文网站内容制作自动furigana视图。为此,我尝试了许多可能的解决方案。 在雅虎的API中有这样做的方法。将furigana添加到网站内容
<?php
$appid = 'My api Key';
$sentence1="日本";
$sentence = mb_convert_encoding($sentence1, 'utf-8', 'auto');
echo $request = "http://jlp.yahooapis.jp/FuriganaService/V1/furigana?appid=".$appid."&sentence=".urlencode($sentence);
但是,在这个雅虎API中,我们需要将所有内容包含到一个变量中并分离成单独的。由于我的内容是动态的,因此会花更多的时间 我需要一个自动furigana解决方案,如IPA Furigana Google Extension。 在此先感谢。
答
这个github将帮助完整furigana。 只需将该变量传递给kuroshiro.convert('变量'),然后您将使用furigana和ruby标签获取数据。
由于它会工作,我已经看到了这个github上,并再次感谢一次。 –