You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/paper/dev/api/component-api/i18n.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Adventure's Javadocs for all-things translations can be found [here](https://jd.
19
19
All translation is done through [`GlobalTranslator`](https://jd.advntr.dev/api/latest/net/kyori/adventure/translation/GlobalTranslator.html).
20
20
You can render translations yourself and add new sources for translations.
21
21
22
-
You can add sources to the `GlobalTranslator` by creating instances of [`TranslationRegistry`](https://jd.advntr.dev/api/latest/net/kyori/adventure/translation/TranslationRegistry.html)
22
+
You can add sources to the `GlobalTranslator` by creating instances of [`TranslationStore`](https://jd.advntr.dev/api/latest/net/kyori/adventure/translation/TranslationStore.html)
23
23
or implementing the [`Translator`](https://jd.advntr.dev/api/latest/net/kyori/adventure/translation/Translator.html) interface yourself.
This creates a new `TranslationRegistry` under a specified namespace. Then, a <Javadocname={"java.util.ResourceBundle"}project={"java"}>`ResourceBundle`</Javadoc>
55
+
This creates a new `TranslationStore` under a specified namespace. Then, a <Javadocname={"java.util.ResourceBundle"}project={"java"}>`ResourceBundle`</Javadoc>
56
56
is created from a bundle located on the classpath with the specified <Javadocname={"java.util.Locale"}project={"java"}>`Locale`</Javadoc>.
57
-
Finally, that `ResourceBundle` is added to the registry. That registry is then added as a source to the `GlobalTranslator`.
57
+
Finally, that `ResourceBundle` is added to the store. That store is then added as a source to the `GlobalTranslator`.
58
58
This makes all the translations available server-side.
59
59
60
60
Now you can use translation keys in translatable components.
0 commit comments