> For the complete documentation index, see [llms.txt](https://wiki.modernmodpacks.site/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.modernmodpacks.site/wiki/hellish-mods/digitality/resource-packs/lang-files.md).

# Lang files

Adding a lang file is as easy as adding a texture:

```java
resources.lang("<lang key>", "<lang value>", "<lang name(optional, default - en_us)>");
```

{% code title="Example" %}

```java
// This code replaces the "menu.singleplayer" key with "Amogus" when the language is set to russian
VirtualResourcePack resources = new VirtualResourcePack("minecraft");
resources.lang("menu.singleplayer", "Amogus", "ru_ru");
```

{% endcode %}

<figure><img src="/files/6IjEijPVHLF1GWOvk2sq" alt=""><figcaption><p>In-game demonstration</p></figcaption></figure>
