//! # Internationalization Module (Future Crate: `rustelo_i18n`)
//!
//! Complete i18n system with dynamic language discovery and Fluent integration.
//!
//! ## Future Crate Boundary
//!
//! **Status:** ⚠️ Widely used - extract carefully
//! **Target Crate:** `rustelo_i18n`
//! **Blockers:** Core dependency for routing, content, and components
//!
//! ### Dependencies (External)
//! - `rustelo_core_types` - Type definitions (already separate crate ✓)
//! - `rustelo_utils` - Utility functions (already separate crate ✓)
//! - `fluent`, `fluent-bundle` - i18n framework
//! - `unic-langid` - Language identifiers
//!
//! ### Dependents (Internal - must update when extracted)
//! - `crate::routing` - Language detection and URL generation
//! - `crate::content` - Localized content resolution
//! - Components (external) - UI translations
//!
//! ## Public API
//!
//! Core i18n functionality:
//! - Dynamic language discovery from filesystem (via rustelo_language)
//! - Page translators for SSR and client contexts
//! - i18n helper functions and utilities
//! - Unified i18n context management
//!
//! **Note:** `discovery` and `language_config` modules have been extracted to
//! `rustelo_language` crate. They are re-exported here for backward
//! compatibility.

pub mod content_helper;
pub mod defs;
pub mod helpers;
pub mod page_translator;
pub mod unified;
pub mod urls;

// Re-export from rustelo_language crate for backward compatibility
// Re-export content helper functions
pub use content_helper::{create_content_provider, ContentAccessor, ContentProvider};
// Re-export commonly used types and functions - now with dynamic language support
pub use defs::{
    get_default_language, get_supported_languages, is_supported_language, t, t_for_language,
    I18nError,
};
// Re-export language discovery functions
pub use discovery::{discover_available_languages, supported_language_count};
pub use helpers::{
    build_page_content, build_page_content_patterns, create_unified_i18n, UnifiedI18nContext,
    UnifiedLocalizationHelper,
};
pub use language_config::{
    get_language_registry, initialize_language_registry, LanguageConfig, LanguageRegistry,
    TextDirection,
};
pub use page_translator::{PageContentBuilder, PageTranslator, SsrTranslator};
pub use rustelo_language::discovery;
pub use rustelo_language::language_config;
#[cfg(target_arch = "wasm32")]
pub use unified::fetch_translations;
pub use unified::{detect_language_from_path as unified_detect_language_from_path, UnifiedI18n};
#[cfg(any(target_arch = "wasm32", feature = "leptos-hydration"))]
pub use unified::{provide_unified_i18n, use_unified_i18n};
pub use urls::localize_url;
