# Query all available locales?

**URL:** <https://community.prismic.io/t/query-all-available-locales/1006>\
**Category:** Developing with Prismic\
**Tags:** rest-api\
**Created:** [June 26, 2020, 1:04pm UTC](https://community.prismic.io/t/query-all-available-locales/1006 "2020-06-26T13:04:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.feit](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/m.feit/32/39_2.png) [@m.feit](https://community.prismic.io/u/m.feit)\
**Post date:** [June 26, 2020, 1:04pm UTC](https://community.prismic.io/t/query-all-available-locales/1006/1 "2020-06-26T13:04:09Z")

</div>

Hi there, is there a way to query all available locales? We are currently building a locale switch for a website will be available in 15+ different countries. I know how i can query the alternative languages as soon as i queried a specific content. But now i would need to find out which locales are generally available even if the content i currently look at hasn't been published to that locale yet.

In this case we would want to send the user to the home page of that locale as a backup solution. Any ideas?

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [June 26, 2020, 1:27pm UTC](https://community.prismic.io/t/query-all-available-locales/1006/2 "2020-06-26T13:27:18Z")

</div>

Hey Matthias,

If you want to see all the available languages of a repository in the REST API then you simply need to query the API at the CDN level like so:  
[https://vuejs-blog-example.cdn.prismic.io/api](https://vuejs-blog-example.cdn.prismic.io/api)

In this example you can see the `languages` object contains English and French like so:

```auto
"languages": [
  {
    "id": "en-gb",
    "name": "English - Great Britain"
  },
  {
    "id": "fr-fr",
    "name": "French - France"
  }
],

```

Thanks.

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [September 21, 2020, 4:41pm UTC](https://community.prismic.io/t/query-all-available-locales/1006/3 "2020-09-21T16:41:07Z")

</div>

closed on September 21, 2020, 4:41pm UTC, flag & select 'Something Else' to reopen.

This issue has been closed due to inactivity.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 5:40pm UTC](https://community.prismic.io/t/query-all-available-locales/1006/4 "2021-12-09T17:40:49Z")

</div>

Opened on December 9, 2021, 5:40pm UTC


