What Programming Languages Does FreeLLM API Support?

FreeLLM API supports six interface languages—English, Chinese (Simplified), French, Spanish, Brazilian Portuguese, and Italian—via JSON locale files in the React and Electron clients.

FreeLLM API provides a multilingual user interface for both its web dashboard and desktop tray application. According to the tashfeenahmed/freellmapi source code, the project implements internationalization (i18n) through a lightweight JSON-based system that bundles translation files directly into the client. These language packs are loaded at runtime and allow users to switch between locales dynamically without reloading the application.

Supported Interface Languages

The following locales are defined as JSON translation files under client/src/i18n/locales/ and mirrored for the desktop application:

Language Locale Code
English en
中文 (简体) zh-CN
Français fr
Español es
Português (Brasil) pt-BR
Italiano it

The UI automatically detects the browser or OS language on first load and persists the user's choice in localStorage under the key freellmapi.locale.

Language Implementation Architecture

FreeLLM API uses React for the web client and Electron for the desktop tray. Both implementations follow a similar pattern: flat JSON files map UI strings to translated values, and a provider component manages the current locale state.

Web Client Configuration (client/src/i18n/I18nProvider.tsx)

The React context defined in client/src/i18n/I18nProvider.tsx loads the appropriate JSON file based on the current locale. You can access the current language and switch methods using the useI18n hook:

import { useEffect } from 'react';
import { useI18n } from '@/i18n/I18nProvider';

// Inside a component
const { locale, setLocale } = useI18n();

useEffect(() => {
  console.log('Current UI language:', locale); // e.g. "en"
}, [locale]);

Desktop Client Configuration (desktop/src/i18n.ts)

The Electron desktop application mirrors the web i18n setup in desktop/src/i18n.ts, ensuring consistency between the web dashboard and the system tray interface. The language selector displayed in the tray menu is implemented in desktop/src/tray.ts.

Switching and Persisting Locale Settings

Users can switch languages via the menu in the top-right corner of the interface. Selecting a language triggers the setLocale function and immediately updates the UI:

// Example snippet from the language selector component
<MenuItem onClick={() => setLocale('fr')}>Français</MenuItem>

The selected locale is automatically persisted to the browser's localStorage:

localStorage.setItem('freellmapi.locale', locale);

On subsequent loads, I18nProvider reads this value to initialize the interface language.

Extending Language Support

Adding a new language requires only three steps: create a JSON translation file, import it into the provider, and register the locale type. For example, to add German (de):


# 1. Copy the English locale file

cp client/src/i18n/locales/en.json client/src/i18n/locales/de.json

# 2. Translate the JSON values

# 3. Register the locale in I18nProvider.tsx:

#    import de from './locales/de.json';

#    const resources = { en, zhCN, fr, es, ptBR, it, de };

#    // Add 'de' to the Locale type union

This design keeps the codebase lightweight while allowing the community to extend support for additional languages.

Summary

  • FreeLLM API ships with six built-in interface languages: English, Chinese (Simplified), French, Spanish, Brazilian Portuguese, and Italian.
  • Translation files are stored in client/src/i18n/locales/ as flat JSON mappings.
  • The React (I18nProvider.tsx) and Electron (i18n.ts) clients share the same localization logic.
  • User preferences persist in localStorage under the key freellmapi.locale.
  • New languages can be added by creating a locale JSON and registering it in the provider component.

Frequently Asked Questions

What programming languages does FreeLLM API support?

FreeLLM API supports six interface languages for its UI: English (en), Chinese Simplified (zh-CN), French (fr), Spanish (es), Brazilian Portuguese (pt-BR), and Italian (it). These are natural languages for the user interface, not programming languages for API development.

How do I change the language in FreeLLM API?

Click the menu in the top-right corner of the dashboard or desktop tray and select your preferred language. The application calls setLocale() with the appropriate code (e.g., 'fr' for French) and stores your choice in localStorage under freellmapi.locale for future sessions.

Where are the translation files located in the FreeLLM API repository?

Translation files are located at client/src/i18n/locales/ for the web client and mirrored in the desktop application's i18n module. Each language has its own JSON file (e.g., en.json, fr.json) containing key-value pairs for UI strings.

Can I add a new language to FreeLLM API?

Yes. Copy the English locale file to create a new JSON file (e.g., de.json for German), translate the values, and import it into client/src/i18n/I18nProvider.tsx (and desktop/src/i18n.ts for desktop support). You must also add the new locale code to the TypeScript union type for Locale to ensure type safety.

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 →