# waqleh/codeigniter-language-in-url-internationalization architecture

> Architecture diagram of the GitHub repository waqleh/codeigniter-language-in-url-internationalization, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/waqleh/codeigniter-language-in-url-internationalization
- Repository: https://github.com/waqleh/codeigniter-language-in-url-internationalization

## Overview

This is a small CodeIgniter extension for selecting a language from the URL and using it for translations and generated links. The main workflow is a localized request selecting the active language, loading language files, and rendering translated text. It also supports switching languages, exempting special URIs, and recording missing strings. The source excerpts show the language and URL-generation logic; controller, view, routing, and language-file interactions are documented examples, not repository modules.

Main entry points: [`MY_Lang.php`](https://github.com/waqleh/codeigniter-language-in-url-internationalization/blob/master/MY_Lang.php) (Language runtime), [`MY_Config.php`](https://github.com/waqleh/codeigniter-language-in-url-internationalization/blob/master/MY_Config.php) (URL configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_language["Language handling"]
  node_language_runtime["Language runtime<br/>[MY_Lang.php]"]
end

subgraph group_urls["Localized URLs"]
  node_url_config["URL configuration<br/>[MY_Config.php]"]
end

subgraph group_translations["Translation content"]
  node_language_files["Language files"]
  node_missing_strings["Missing-string writer<br/>[MY_Lang.php]"]
end

node_request(("Browser request"))
node_framework["CodeIgniter app"]
node_translated_view["Translated view"]

node_request -->|"routes request"| node_framework
node_framework -->|"selects language"| node_language_runtime
node_framework -->|"loads file"| node_language_files
node_language_files -->|"supplies translations"| node_translated_view
node_framework -->|"renders view"| node_translated_view
node_url_config -->|"localizes URL"| node_language_runtime
node_language_runtime -->|"records missing key"| node_missing_strings
node_framework -->|"generates URL"| node_url_config

click node_language_runtime "https://github.com/waqleh/codeigniter-language-in-url-internationalization/blob/master/MY_Lang.php"
click node_url_config "https://github.com/waqleh/codeigniter-language-in-url-internationalization/blob/master/MY_Config.php"
click node_missing_strings "https://github.com/waqleh/codeigniter-language-in-url-internationalization/blob/master/MY_Lang.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_language_runtime,node_request,node_translated_view toneBlue
class node_url_config toneAmber
class node_language_files,node_missing_strings toneMint
class node_framework toneIndigo
```

## Components

### Language handling

- [Language runtime](https://github.com/waqleh/codeigniter-language-in-url-internationalization/blob/master/MY_Lang.php): `MY_Lang.php`

### Localized URLs

- [URL configuration](https://github.com/waqleh/codeigniter-language-in-url-internationalization/blob/master/MY_Config.php): `MY_Config.php`

### Translation content

- **Language files**
- [Missing-string writer](https://github.com/waqleh/codeigniter-language-in-url-internationalization/blob/master/MY_Lang.php): `MY_Lang.php`

### Other components

- **Browser request**
- **CodeIgniter app**
- **Translated view**

## Connections

- Browser request → CodeIgniter app: routes request (evidence: `README.md`)
- CodeIgniter app → Language runtime: selects language (evidence: `README.md`)
- CodeIgniter app → Language files: loads file (evidence: `README.md`)
- Language files → Translated view: supplies translations (evidence: `README.md`)
- CodeIgniter app → Translated view: renders view (evidence: `README.md`)
- URL configuration → Language runtime: localizes URL (evidence: `MY_Config.php`)
- Language runtime → Missing-string writer: records missing key (evidence: `MY_Lang.php`)
- CodeIgniter app → URL configuration: generates URL (evidence: `README.md`)
