How to get current selected locale from plugin-i18n in custom field

Found a sollution:
import { useQueryParams } from "@strapi/helper-plugin"
Use this to get the current locale from the query params