bitrix-localization

Standardize Bitrix translation loading across PHP and JavaScript with Loc::loadMessages.

33|3|Updated Jun 5, 2025
One-click install
npx skills add https://github.com/bxmaximum/bitrix_ai_challenge --skill bitrix-localization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bitrix-localization
Source: https://github.com/bxmaximum/bitrix_ai_challenge/tree/main/.agents/skills/bitrix-localization
Command: npx skills add https://github.com/bxmaximum/bitrix_ai_challenge --skill bitrix-localization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bitrix localization can be fragmented across PHP backends, language files, and JavaScript, leading to inconsistent translations and maintenance overhead. This Skill centralizes loading and usage of translations, ensuring a consistent multilingual UI across server and client boundaries.

Core Features & Use Cases

  • Centralized localization workflow using Loc::loadMessages and Loc::getMessage for PHP and JS.
  • Lang file conventions and culture-aware formatting (Context::getCulture) to support multilingual sites.
  • JavaScript localization via BX.message and Bitrix Loca to deliver dynamic translations in UI components.
  • Use Case: A Bitrix-powered site supports en/ru locales with consistent translations on pages and widgets, including JS-driven prompts and messages.

Quick Start

Configure and load language messages for PHP and JavaScript using Loc::loadMessages and Loc::getMessage to render localized UI.

Frequently Asked Questions about bitrix-localization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load and use Bitrix localization files in both PHP and JavaScript?

Bitrix localization standardizes loading translations via Loc::loadMessages for PHP and BX.message for JavaScript. This approach ensures consistent multilingual UI rendering across both server-side and client-side components.

What is the best way to manage language files for a multilingual Bitrix site?

Managing Bitrix lang files requires standardizing conventions in the lang/<lang> directory and utilizing translate:index indexing. This centralizes translation loading to prevent inconsistent multilingual content across modules.

Does Bitrix support culture-aware formatting for different locales?

Yes, Bitrix supports culture-aware formatting through Context::getCulture. This integrates with Loc::loadMessages to ensure multilingual applications display locale-specific formats correctly across both PHP and JavaScript boundaries.

Why are my JavaScript translations inconsistent with PHP lang files in Bitrix?

Inconsistent Bitrix translations occur when PHP and JS localization workflows are fragmented. Standardizing the loading process using Loc::loadMessages for PHP and BX.message for JavaScript centralizes translations and resolves maintenance overhead.

Can I use this localization workflow for enterprise-scale Bitrix applications?

Yes, this Bitrix localization workflow supports multilingual enterprise applications. By standardizing Loc::loadMessages, Culture-based formats, and translate:index indexing, it handles complex translation needs across modules and dynamic UI components.