Skip to content

Commit

Permalink
docs: docs translations, added Language page
Browse files Browse the repository at this point in the history
  • Loading branch information
Misat11 authored Jan 19, 2025
1 parent 778bc05 commit 6af7573
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 13 deletions.
11 changes: 1 addition & 10 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -667,13 +667,4 @@ game-effects:
BLUE: 255
GREEN: 255
type: BALL # effect type
```
## Custom language
* Download the base language file from [here](https://github.com/ScreamingSandals/BedWars/tree/ver/0.2.x/plugin/src/main/resources/languages)
* Create folder named "**languages**" in your _BedWars_ folder. (_BedWars_ folder is in default _plugins_ folder)
* Paste your language here. For example, language_cs.yml
* Open your **config.yml** and configure variable "**locale**" to "**cs**"
And that's it, you have your own language!
```
10 changes: 8 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
Flexible BedWars plugin, formerly coded as a replacement for BedwarsRel.
Supported versions: \[1.8.8 - 1.21.4\], recommended versions: \[1.21.4\].

## Unofficial translations

The following languages have unofficial translations of this documentation. Please note that these translations are community-driven and may not reflect the latest updates or changes.

* [Chinese Translation on Yizhan Wiki](https://plugins.yizhan.wiki/ShortDoc/BedWars)

## Support

If you need any help, you can contact us on [Discord](https://screamingsandals.org/discord). Make sure to read this documentation, the servers' rules and the FAQ's before asking for support.
If you need help, you can contact us on [Discord](https://screamingsandals.org/discord) or [GitHub Discussions](https://github.com/ScreamingSandals/BedWars/discussions). Please read this documentation, the server rules, and the FAQs before asking for support.

If you find any bugs, feel free to report it into [GitHub issues](https://github.com/ScreamingSandals/BedWars/issues), we will look into it.
If you encounter any bugs, feel free to report them on [GitHub Issues](https://github.com/ScreamingSandals/BedWars/issues), and we will check them out.

## Features

Expand Down
105 changes: 105 additions & 0 deletions docs/language.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Language

## Using built-in languages

To use one of the built-in languages, update the `locale` value in your `config.yml` file to your desired language code. Below is a list of available language codes:

```yaml
# Example: Set to Czech (Čeština)
locale: cs
```
| Language Code | Language Name | Native Name |
|---------------|--------------------------|--------------------------|
| `af` | Afrikaans | Afrikaans |
| `ar` | Arabic | العربية |
| `bg` | Bulgarian | Български |
| `bs` | Bosnian | Bosanski |
| `ca` | Catalan | Català |
| `cs` | Czech | Čeština |
| `da` | Danish | Dansk |
| `de` | German | Deutsch |
| `el` | Greek | Ελληνικά |
| `en-UD` | English (Upside Down) | English (Upside Down) |
| `en` | English | English |
| `es` | Spanish | Español |
| `fi` | Finnish | Suomi |
| `fr` | French | Français |
| `he` | Hebrew | עברית |
| `hr` | Croatian | Hrvatski |
| `hu` | Hungarian | Magyar |
| `id` | Indonesian | Bahasa Indonesia |
| `it` | Italian | Italiano |
| `ja` | Japanese | 日本語 |
| `ko` | Korean | 한국어 |
| `lv` | Latvian | Latviešu |
| `nl` | Dutch | Nederlands |
| `no` | Norwegian | Norsk |
| `pl` | Polish | Polski |
| `pt-BR` | Portuguese (Brazil) | Português (Brasil) |
| `pt` | Portuguese | Português |
| `ro` | Romanian | Română |
| `ru` | Russian | Русский |
| `sk` | Slovak | Slovenčina |
| `sl` | Slovenian | Slovenščina |
| `sr-CS` | Serbian (Cyrillic) | Српски (ћирилица) |
| `sr` | Serbian (Latin) | Srpski (latinica) |
| `sv` | Swedish | Svenska |
| `th` | Thai | ภาษาไทย |
| `tr` | Turkish | Türkçe |
| `uk` | Ukrainian | Українська |
| `vi` | Vietnamese | Tiếng Việt |
| `zh-CN` | Chinese (Simplified) | 简体中文 |
| `zh` | Chinese (Traditional) | 繁體中文 |

These translations are maintained by the community and may not always be fully complete. If you would like to help improve them, you can contribute on our [Weblate instance](https://weblate.screamingsandals.org/projects/bedwars/0-2-x/).

!!! note "Using Norwegian language"

YAML treats the literal value `no` as `false`. To use `no` as the Norwegian language code, you must cast it to a string like this:
```yaml
locale: "no"
```

!!! note "Empty language folder"

The `languages` folder is typically empty because the built-in languages are stored within the plugin jar itself. You do not need to download any files unless you plan to customize the translations.


These translations are maintained by the community and may not be 100% complete. You can help us translating them [on our Weblate instance](https://weblate.screamingsandals.org/projects/bedwars/0-2-x/).

## Customizing language files

If you wish to make changes to language files, follow these steps:

1. **Download the base language file**
You can download the base language files from our [GitHub repository](https://github.com/ScreamingSandals/BedWars/tree/ver/0.2.x/plugin/src/main/resources/languages).
2. **Add the file to your languages folder**
Place your modified language file in the `languages` folder inside your `BedWars` folder (located in the default `plugins` folder). For example, to modify the Czech language, create a file named `language_cs.yml`.
3. **Update `config.yml`**
Update the `locale` variable in your `config.yml` to match your file’s language code.
```yaml
# Example for Czech:
locale: cs
```

!!! tip

While you can download and modify the entire language file, it is better to create an empty language file and include only the lines you want to override.
This ensures that any untranslated lines will still use the updated built-in versions. If you paste the unchanged lines into your custom file, they will override the built-in translations, even if the plugin updates them later.

## Creating a new language

To create a completely new language, follow these steps:

1. Download the English language file from the [GitHub repository](https://github.com/ScreamingSandals/BedWars/tree/ver/0.2.x/plugin/src/main/resources/languages).
2. Save the file as `language_myCode.yml`, where `myCode` is your desired language code.
3. Translate the individual lines into your new language.
4. Update the `locale` variable in your `config.yml` to your new language code:
```yaml
locale: myCode
```

!!! tip

If you create a new language, consider helping us add it to the plugin by contributing to our Weblate instance! This way, your language becomes available to everyone in future plugin updates. Visit our [Weblate instance](https://weblate.screamingsandals.org/projects/bedwars/0-2-x/) to get started.
2 changes: 1 addition & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Use the `applycolorbyteam` property, for example:
See the [Upgrades](upgrades.md) article.
## Language file
See the [Configuration](config.md#custom-language) article.
See the [Language](language.md) article.
## PlaceholderAPI placeholders
See the [Placeholder API](placeholderapi.md) article.
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ nav:
- Arena creation: arena.md
- BungeeCord mode: bungee.md
- Configuration: config.md
- Language: language.md
- Commands and Permissions: commands.md
- Shop: shop.md
- Upgrades: upgrades.md
Expand Down

0 comments on commit 6af7573

Please sign in to comment.