Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/internationalization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You can also choose to [add your own i18n logic in addition to or instead of Ast

## Configure i18n routing

Both a list of all supported languages ([`locales`](/en/reference/configuration-reference/#i18nlocales)) and a default language ([`defaultLocale`](/en/reference/configuration-reference/#i18ndefaultlocale)), which must be one of the languages listed in `locales`, need to be specified in an `i18n` configuration object. Additionally, you can configure more specific routing and fallback behavior to match your desired URLs.
When you create an `i18n` configuration object, you must specify both a list of all supported languages ([`locales`](/en/reference/configuration-reference/#i18nlocales)), and set one of the locales in the list as the default language ([`defaultLocale`](/en/reference/configuration-reference/#i18ndefaultlocale). You can also configure more specific routing and fallback behavior to match your desired URLs.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about something like this? Do you think it's easier to read/understand?

Suggested change
When you create an `i18n` configuration object, you must specify both a list of all supported languages ([`locales`](/en/reference/configuration-reference/#i18nlocales)), and set one of the locales in the list as the default language ([`defaultLocale`](/en/reference/configuration-reference/#i18ndefaultlocale). You can also configure more specific routing and fallback behavior to match your desired URLs.
In your [`i18n` configuration](/en/reference/configuration-reference/#i18n), specify both a list of all supported [`locales`](/en/reference/configuration-reference/#i18nlocales) and a [`defaultLocale`](/en/reference/configuration-reference/#i18ndefaultlocale) present in that list. Additionally, you can configure more specific routing and fallback behavior to match your desired URLs.

My thinking is to improve the consistency at the same time. We usually don't use "languages (locales)" but "locales" directly (e.g. Custom locale paths), I don't see any reason to make an exception here. And, we can remove some words to make the sentence shorter and more direct.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally think it makes sense to hint that a "locale" represents a language, for readers who are just setting this up for the first time. However, I was mostly leaving it in because it was already there.

This specific phrasing adds more complex words and sentence structure in the service of lowering word count, but my background is in writing for Global English and this isn't my style guide. ¯_(ツ)_/¯

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This specific phrasing adds more complex words and sentence structure

I'm not a native speaker, but I would say it's the other way around? Shorter and direct sentences are easier to parse. And a tool like the Hemingway App seems to say the same when comparing both sentences.

I personally think it makes sense to hint that a "locale" represents a language

Alright, I don't have a strong opinion on this.

Suggested change
When you create an `i18n` configuration object, you must specify both a list of all supported languages ([`locales`](/en/reference/configuration-reference/#i18nlocales)), and set one of the locales in the list as the default language ([`defaultLocale`](/en/reference/configuration-reference/#i18ndefaultlocale). You can also configure more specific routing and fallback behavior to match your desired URLs.
In your [`i18n` configuration](/en/reference/configuration-reference/#i18n), specify both a list of all supported languages ([`locales`](/en/reference/configuration-reference/#i18nlocales)) and a default language ([`defaultLocale`](/en/reference/configuration-reference/#i18ndefaultlocale)) present in that list. Additionally, you can configure more specific routing and fallback behavior to match your desired URLs.

If you don't like this, do not hesitate to suggest something else. But, "When you create" and "you must" seem superfluous to me and an imperative style should be used instead.

this isn't my style guide

Well, you can read more about our style guide in Astro Docs Docs 😄


```js title="astro.config.mjs"
import { defineConfig } from "astro/config"
Expand Down
Loading