Skip to content

Commit ba99e1a

Browse files
committed
fix: i18n adventure example
1 parent 0e5d8fa commit ba99e1a

File tree

1 file changed

+3
-3
lines changed
  • src/content/docs/paper/dev/api/component-api

1 file changed

+3
-3
lines changed

src/content/docs/paper/dev/api/component-api/i18n.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ some.translation.key=Translated Message: {0}
4545
```
4646

4747
```java
48-
TranslationStore store = TranslationStore.messageFormat(Key.key("namespace:value"));
48+
TranslationStore.StringBased<MessageFormat> store = TranslationStore.messageFormat(Key.key("namespace:value"));
4949

5050
ResourceBundle bundle = ResourceBundle.getBundle("your.plugin.Bundle", Locale.US, UTF8ResourceBundleControl.get());
5151
store.registerAll(Locale.US, bundle, true);
@@ -57,10 +57,10 @@ is created from a bundle located on the classpath with the specified [`Locale`](
5757
Finally, that `ResourceBundle` is added to the store. That store is then added as a source to the `GlobalTranslator`.
5858
This makes all the translations available server-side.
5959

60-
Now you can use translation keys in translatable components.
60+
Now you can use your translation keys in translatable components.
6161

6262
```java
63-
final Component message = Component.translatable("some.translation.key", Component.text("The Argument"))
63+
Component.translatable("some.translation.key", Component.text("The Argument"))
6464
```
6565

6666
This will show to clients using the US English language: `Translated Message: The Argument`.

0 commit comments

Comments
 (0)