## List captions or subtitles for a provided language `client.Stream.Captions.Language.Get(ctx, identifier, language, query) (*Caption, error)` **get** `/accounts/{account_id}/stream/{identifier}/captions/{language}` Lists the captions or subtitles for provided language. ### Parameters - `identifier string` A Cloudflare-generated unique identifier for a media item. - `language string` The language tag in BCP 47 format. - `query CaptionLanguageGetParams` - `AccountID param.Field[string]` Identifier. ### Returns - `type Caption struct{…}` - `Generated bool` Whether the caption was generated via AI. - `Label string` The language label displayed in the native language to users. - `Language string` The language tag in BCP 47 format. - `Status CaptionStatus` The status of a generated caption. - `const CaptionStatusReady CaptionStatus = "ready"` - `const CaptionStatusInprogress CaptionStatus = "inprogress"` - `const CaptionStatusError CaptionStatus = "error"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/stream" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) caption, err := client.Stream.Captions.Language.Get( context.TODO(), "ea95132c15732412d22c1476fa83f27a", "tr", stream.CaptionLanguageGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", caption.Generated) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "generated": true, "label": "Türkçe", "language": "tr", "status": "ready" } } ```