|  |  | @ -78,16 +78,11 @@ class I18N extends Component | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 * @param string $category the message category. |  |  |  | 	 * @param string $category the message category. | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 * @param string $message the message to be translated. |  |  |  | 	 * @param string $message the message to be translated. | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 * @param array $params the parameters that will be used to replace the corresponding placeholders in the message. |  |  |  | 	 * @param array $params the parameters that will be used to replace the corresponding placeholders in the message. | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 * @param string $language the language code (e.g. `en_US`, `en`). If this is null, the current |  |  |  | 	 * @param string $language the language code (e.g. `en_US`, `en`). | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 	 * [[\yii\base\Application::language|application language]] will be used. |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 	 * @return string the translated message. |  |  |  | 	 * @return string the translated message. | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 */ |  |  |  | 	 */ | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public function translate($category, $message, $params = array(), $language = null) |  |  |  | 	public function translate($category, $message, $params, $language) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 		if ($language === null) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			$language = Yii::$app->language; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		$message = $this->getMessageSource($category)->translate($category, $message, $language); |  |  |  | 		$message = $this->getMessageSource($category)->translate($category, $message, $language); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		if (!is_array($params)) { |  |  |  | 		if (!is_array($params)) { | 
			
		
	
	
		
		
			
				
					|  |  | 
 |