How to Access Multilingual Instructions in the Exercises-Dataset

The exercises-dataset stores step-by-step instructions for every exercise in ten languages (English, Spanish, Italian, Turkish, Russian, Chinese, Hindi, Polish, Korean, French) within an instructions object keyed by ISO-2 language codes in data/exercises.json.

The hasaneyldrm/exercises-dataset repository provides a comprehensive collection of fitness exercises with full multilingual support. Each exercise record contains complete textual instructions translated into ten languages, enabling developers to build localized fitness applications without external translation services. To access multilingual instructions, you parse the JSON file and index the instructions object using standard ISO-2 language codes.

Understanding the Multilingual Data Structure

The instructions Object in data/exercises.json

Inside data/exercises.json, every exercise object contains an instructions property that maps ISO-2 language codes to complete textual descriptions. According to the README's Data Schema section【/cache/repos/github.com/hasaneyldrm/exercises-dataset/main/README.md#L183-L191】, the supported languages include English (en), Spanish (es), Italian (it), Turkish (tr), Russian (ru), Chinese (zh), Hindi (hi), Polish (pl), Korean (ko), and French (fr). Each key holds the full step-by-step description as a single string value.

Step-by-Step Arrays with instruction_steps

For user interfaces that require rendering instructions as numbered lists, the dataset provides an instruction_steps object. This property contains the same ten language keys, but each value is an ordered array of individual steps rather than a concatenated string【/cache/repos/github.com/hasaneyldrm/exercises-dataset/main/README.md#L193-L194】. This structure allows precise control over formatting and progression tracking in applications.

Accessing Multilingual Instructions in Python

Because the data is pure JSON, you can load it with standard Python libraries. The README includes ready-to-run snippets demonstrating how to iterate through every language version of the instructions【/cache/repos/github.com/hasaneyldrm/exercises-dataset/main/README.md#L329-L340】.

import json

# Load the full dataset

with open("data/exercises.json", "r", encoding="utf-8") as f:
    exercises = json.load(f)

# Choose any exercise (here the first one)

ex = exercises[0]

# Print the multilingual instructions

for lang, text in ex["instructions"].items():
    print(f"{lang.upper()}:\n{text}\n")

To access a specific language directly, index the object with the ISO-2 code:


# Get Russian instructions for the first exercise

russian_text = exercises[0]["instructions"]["ru"]

Accessing Instructions in JavaScript and TypeScript

JavaScript Implementation

Load the dataset using require() or dynamic imports, then access the multilingual fields through standard object notation:

const exercises = require("./data/exercises.json");

// Grab the first exercise
const ex = exercises[0];

// English instructions
console.log("EN:", ex.instructions.en);

// Spanish instructions
console.log("ES:", ex.instructions.es);

TypeScript Interfaces for Type Safety

For type-safe access, define interfaces that match the schema structure:

interface Exercise {
  id: string;
  name: string;
  instructions: {
    en: string;
    es: string;
    it: string;
    tr: string;
    ru: string;
    zh: string;
    hi: string;
    pl: string;
    ko: string;
    fr: string;
  };
  instruction_steps: {
    en: string[];
    es: string[];
    it: string[];
    tr: string[];
    ru: string[];
    zh: string[];
    hi: string[];
    pl: string[];
    ko: string[];
    fr: string[];
  };
}

import exercises from "./data/exercises.json";
const data = exercises as Exercise[];

// Example: get French steps for the third exercise
const frenchSteps = data[2].instruction_steps.fr;
console.log("French steps:", frenchSteps);

Analyzing Multilingual Data with Pandas

For data science workflows, convert the nested JSON structure into a flat DataFrame using pd.json_normalize():

import json
import pandas as pd

with open("data/exercises.json", "r", encoding="utf-8") as f:
    data = json.load(f)

df = pd.json_normalize(data, sep="_")

# The columns are now like instructions.en, instructions.es, …

print(df[["instructions.en", "instructions.es", "instructions.fr"]].head())

This normalization creates separate columns for each language (e.g., instructions.en, instructions.es), enabling vectorized operations and filtering across specific languages.

Schema Validation and Documentation

The formal structure of these multilingual fields is defined in data/exercises.schema.json, which validates the instructions property and its language-specific sub-properties. The README's Data Schema section【/cache/repos/github.com/hasaneyldrm/exercises-dataset/main/README.md#L183-L194】 documents the exact shape of these objects, while the Usage Examples section【/cache/repos/github.com/hasaneyldrm/exercises-dataset/main/README.md#L329-L340】 provides additional ready-to-run code snippets demonstrating multilingual access patterns.

Summary

  • Ten languages supported: English, Spanish, Italian, Turkish, Russian, Chinese, Hindi, Polish, Korean, and French via ISO-2 codes in data/exercises.json.
  • Two access patterns: Use instructions for full text strings or instruction_steps for ordered arrays of individual steps.
  • Schema validation: The JSON Schema in data/exercises.schema.json officially describes the multilingual field structure.
  • Language agnostic: As pure JSON, the dataset works with Python, JavaScript, TypeScript, or any language with JSON parsing capabilities.

Frequently Asked Questions

What languages are supported in the exercises-dataset?

The dataset supports ten languages: English (en), Spanish (es), Italian (it), Turkish (tr), Russian (ru), Chinese (zh), Hindi (hi), Polish (pl), Korean (ko), and French (fr). Each exercise contains complete instructions in all ten languages within the instructions object.

How do I access individual instruction steps instead of full text?

Use the instruction_steps property rather than instructions. This object contains the same ISO-2 language keys, but each value is an array of strings where each element represents a single step in the exercise sequence. This format is ideal for rendering numbered lists or progress trackers in user interfaces.

Where is the schema for multilingual instructions defined?

The schema is formally defined in data/exercises.schema.json, which specifies the instructions property as an object containing string values for each supported language code. Human-readable documentation appears in the README's Data Schema table【/cache/repos/github.com/hasaneyldrm/exercises-dataset/main/README.md#L183-L194】.

Can I load the multilingual data in languages other than Python and JavaScript?

Yes. Because data/exercises.json is standard UTF-8 encoded JSON, you can parse it with any programming language that has JSON support, including Go, Rust, Java, C#, Ruby, or PHP. Simply load the file and access the instructions object using the appropriate ISO-2 language code key for your target language.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →