Localization Provider

ILocalizationService in assembly SanteDB.Core.Api version 3.0.1980.0

Summary

Interface which provides localization functions

Operations

Operation
Response/Return
Input/Parameter
Description

GetString

String

String stringKey

Get the specified string in the current locale

GetString

String

String locale String stringKey

Get the specified string in the current locale

GetString

String

String stringKey Object parameters

Get the specified string in the current locale

GetString

String

String locale String stringKey Object parameters

Get the specified string in the current locale

GetAvailableLocales

IEnumerable<String>

none

TODO

GetStrings

IEnumerable<KeyValuePair<String,String>>

String locale

Get all strings in the specified locale

Reload

void

none

TODO

Implementations

Applet Localization Service - (SanteDB.Core.Applets)

Applet localization

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Core.Applets.Services.Impl.AppletLocalizationService, SanteDB.Core.Applets, Version=3.0.1980.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

Example Implementation

/// Example Implementation
using SanteDB.Core.Services;
/// Other usings here
public class MyLocalizationService : SanteDB.Core.Services.ILocalizationService { 
	public String ServiceName => "My own ILocalizationService service";
	/// <summary>
	/// Get the specified string in the current locale
	/// </summary>
	public String GetString(String stringKey){
		throw new System.NotImplementedException();
	}
	/// <summary>
	/// Get the specified string in the current locale
	/// </summary>
	public String GetString(String locale,String stringKey){
		throw new System.NotImplementedException();
	}
	/// <summary>
	/// Get the specified string in the current locale
	/// </summary>
	public String GetString(String stringKey,Object parameters){
		throw new System.NotImplementedException();
	}
	/// <summary>
	/// Get the specified string in the current locale
	/// </summary>
	public String GetString(String locale,String stringKey,Object parameters){
		throw new System.NotImplementedException();
	}
	public IEnumerable<String> GetAvailableLocales(){
		throw new System.NotImplementedException();
	}
	/// <summary>
	/// Get all strings in the specified locale
	/// </summary>
	public IEnumerable<KeyValuePair<String,String>> GetStrings(String locale){
		throw new System.NotImplementedException();
	}
	public void Reload(){
		throw new System.NotImplementedException();
	}
}

References

Last updated