Update Vietnamese Translation with footnotes from Quranenc.com
complete
b
bach
Assalamualaykum brothers,
Could you please update the Vietnamese translation by Hasan Abdul-Karim? I have a suggestion below.
The Vietnamese translation by Hasan Abdul-Karim in the app has some syntax errors and lacks all footnotes. Although Quranenc.com doesn't have a direct link to access API for Hasan Abdul-Karim's translation, I have found that I can guess the translation_key which allows me to make HTTP requests and access this translation with all the footnotes.
#Here's the Python code I tried to test the API to get Hasan's translation using Google Colab. I used "vietnamese_hassan" for translation_key.
import requests
from bs4 import BeautifulSoup
Set the base URL and translation key
base_url = "https://quranenc.com/api/v1/translation/sura"
translation_key = "vietnamese_hassan"
Function to get the translation for a specific surah
def get_translation(sura_number):
url = f"{base_url}/{translation_key}/{sura_number}"
response = requests.get(url)
data = response.json()
return data
get_translation(1)
with open("quran_vietnamese_hassan.txt", "w", encoding="utf-8") as file:
for sura_number in range(1, 115):
translation_data = get_translation(sura_number)
for verse in translation_data["result"]:
sura = verse["sura"]
aya = verse["aya"]
text = verse["translation"]
footnotes = verse["footnotes"]
print(verse)
file.write(f"{sura}:{aya} - {text}\n{footnotes}\n")
file.write("\n")
Log In
Golam Kader
marked this post as
complete
Walaikumus salam warahmatullah.
We have updated the Vietnamese translation from the mentioned source. Please update your apps to get the latest version.
Jazakallah Khair.
b
bach
Golam Kader assalamualaikum warahmatullah.
I think the footnote issue still persists with this translation by Hasan Abdul-Karim.
Im on the lastest version and also updated the translation.
(screen record of the issue: https://drive.google.com/file/d/1VtIiutEI-JmIkRZVFofYvTicjMQQ0TcU/view?usp=drivesdk)
Since then, quranenc has added official API specs on their new website https://new.quranenc.com/en/browse/vietnamese_hassan . I also attached a screenshot here.
Jazakallah khair.