quran-meta
    Preparing search index...

    Function getSurahNames

    • Retrieves the list of Surah names in the specified language.

      This bundles every language. To ship only one, import its table (surahNamesFr) or load it with getSurahNamesAsync from quran-meta/i18n/async.

      Parameters

      • lang:
            | "en"
            | "ar"
            | "az"
            | "ru"
            | "tr"
            | "uz"
            | "kk"
            | "fr"
            | "lt"
            | "tg"
            | "ky"
            | "bs"
            | "bn"
            | "es"
            | "id"
            | "it"
            | "ml"
            | "ms"
            | "nl"
            | "sv"
            | "ur"
            | "zh"

        The language code for which to retrieve the Surah names

      Returns [
          []
          | SurahName,
          [] | SurahName,
          [] | SurahName,
          [] | SurahName,
          [] | SurahName,
          [] | SurahName,
          [] | SurahName,
          [] | SurahName,
          [] | SurahName,
      ]

      An array indexed by surah number of [name, translation] pairs

      const arabicNames = getSurahNames("ar")
      const englishNames = getSurahNames("en")
      englishNames[2] // ["Al-Baqara", "The Cow"]