async function createGlossary(
    languages,
    projectId,
    glossaryName,
    glossaryUri
  ) {
    // Instantiates a client
    const translationClient = await new translate.TranslationServiceClient();

    // Construct glossary
    const glossary = {
      languageCodesSet: {
        languageCodes: languages,
      },
      inputConfig: {
        gcsSource: {
          inputUri: glossaryUri,
        },
      },
      name: translationClient.glossaryPath(
        projectId,
        'us-central1',
        glossaryName
      ),
    };

    // Construct request
    const request = {
      parent: translationClient.locationPath(projectId, 'us-central1'),
      glossary: glossary,
    };

    // Create glossary using a long-running operation.
    try {
      const [operation] = await translationClient.createGlossary(request);
      // Wait for operation to complete.
      await operation.promise();
      console.log('Created glossary ' + glossaryName + '.');
    } catch (AlreadyExists) {
      console.log(
        'The glossary ' +
          glossaryName +
          ' already exists. No new glossary was created.'
      );
    }
  }
Creates a GCP glossary resource
Assumes you've already manually uploaded a glossary to Cloud Storage

ARGS
languages: list of languages in the glossary
projectId: GCP project id
glossaryName: name you want to give this glossary resource
glossaryUri: the uri of the glossary you uploaded to Cloud Storage
RETURNS
nothing