# Localization Basics

> Example code is available on [github.com/vaadin-on-grails/localization-basics](https://github.com/vaadin-on-grails/localization-basics).

Localization property files are stored in `grails-app/i18n` folder.

![Localization Folder](http://vaadinongrails.com/img/idea-i18n.png)

In order to access the values in from the localized property files, use `Grails.i18n()` method. `Grails` class is provided by the plugin. Here are various ways how to use i18n method.

```java
import static com.vaadin.grails.Grails.i18n
import static java.util.Locale.ENGLISH

String label = i18n("default.home.label")

String homeEng = i18n("default.home.label", ENGLISH)

Object[] newItemArgs = ["Proper label to be shown"]
String newItem = i18n("default.home.label", newItemArgs)

String newItemEng = i18n("default.home.label", newItemArgs, ENGLISH)

String newItemEngDef = i18n("do.not.exist", newItemArgs, "Default label for {0}", ENGLISH)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ondrej-kvasnovsky-2.gitbook.io/vaadin-on-grails/localization/basics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
