code: @PUT
      @Consumes(MediaType.APPLICATION_JSON)
      @Produces(MediaType.APPLICATION_JSON)
      @RequiresPermissions(I18nPermissions.LOCALE_WRITE)
      public Response changeDefaultLocale(LocaleRepresentation representation) throws URISyntaxException {
          WebAssertions.assertNotNull(representation, "The locale should not be null");
          WebAssertions.assertNotBlank(representation.getCode(), "The locale code should not be blank");
          try {
              localeService.changeDefaultLocaleTo(representation.getCode());
          } catch (Exception e) {
              logger.error(e.getMessage(), e);
              return Response.status(Response.Status.NOT_FOUND).build();
          }
  
          return Response.ok(new URI(uriInfo.getRequestUri().toString()))
                  .entity(localeFinder.findDefaultLocale()).build();
      }
docs: Changes the default locale
  
  @param representation locale representation
  @return result
  @throws java.net.URISyntaxException if URI is not valid