Home / Function/ computePreferredLocaleList() — astro Function Reference

computePreferredLocaleList() — astro Function Reference

Architecture documentation for the computePreferredLocaleList() function in render-context.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  5c3edeac_afc1_52c5_f90c_50d258bfdbfd["computePreferredLocaleList()"]
  b7425a46_8c1f_1122_7ae3_a00e52db1d90["RenderContext"]
  5c3edeac_afc1_52c5_f90c_50d258bfdbfd -->|defined in| b7425a46_8c1f_1122_7ae3_a00e52db1d90
  d91ba7de_e6ec_e3f2_d698_49f283edc9ab["createActionAPIContext()"]
  d91ba7de_e6ec_e3f2_d698_49f283edc9ab -->|calls| 5c3edeac_afc1_52c5_f90c_50d258bfdbfd
  0007f436_547e_7fd2_f341_1a05d84a40a6["createAstroPagePartial()"]
  0007f436_547e_7fd2_f341_1a05d84a40a6 -->|calls| 5c3edeac_afc1_52c5_f90c_50d258bfdbfd
  style 5c3edeac_afc1_52c5_f90c_50d258bfdbfd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/render-context.ts lines 864–871

	computePreferredLocaleList() {
		const {
			pipeline: { i18n },
			request,
		} = this;
		if (!i18n) return;
		return (this.#preferredLocaleList ??= computePreferredLocaleList(request, i18n.locales));
	}

Domain

Subdomains

Frequently Asked Questions

What does computePreferredLocaleList() do?
computePreferredLocaleList() is a function in the astro codebase, defined in packages/astro/src/core/render-context.ts.
Where is computePreferredLocaleList() defined?
computePreferredLocaleList() is defined in packages/astro/src/core/render-context.ts at line 864.
What calls computePreferredLocaleList()?
computePreferredLocaleList() is called by 2 function(s): createActionAPIContext, createAstroPagePartial.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free