How to set up the desired languages in your system and how to set a default language for your applications.
Overview
The available languages in the Order Website are defined by the root reseller. Languages that are selected as root reseller get available in the Order Website.
Before you begin
Set up reseller root domains, see Configuring reseller root domains.
Setting up languages in Store and Order Page
- Go to Admin panel > Settings > Reseller Configuration
- Select languages in field Available languages, and klick Save.
- If the desired languages are not listed in field Available languages, proceed as follows:
- Insert the desired language in database AtomiaAccount, table languages using the following query (this language is only an example).
- In MSSQL dialect:
- In PostgreSQL dialect, against AtomiaAccount database:
- Add resource files *.resx into folder in location: C:\Program Files (x86)\Atomia\Store\App_GlobalResources.
Begin tran Insert into AtomiaAccount.dbo.language (id, name, iso639name, culture) values(NEWID(), ‘British’ , ’EN’, ‘GB’) commit
Begin; Insert into language (id, name, iso639name, culture) values(uuid_generate_v4(), ‘British’ , ’EN’, ‘GB’) commit
- Use a text editor to make a translation for text between
<value> Some text for translation </value>
to the desired language. - After making resx files for the desired languages, add the following blocks to the Common.resx files:
- Go to the list of Available languages in Admin panel > Settings > Reseller Configuration.
- Select the languages that you want to display in the language selector in Store, and click Save.
- If you are not able to see Root reseller in Reseller Configuration, you need to add language to root reseller through the database running the following queries:
- Find Root reseller ID from AtomiaAccount database, table account – for SQL => select * from account where name = ‘100000’ – for postgreSQL => select * from account where name = ‘100000
- Find the root reseller ID from the AtomiaAccount database.
SQL Server => SELECT * FROM account WHERE name = ‘100000’;
PostgreSQL => SELECT * FROM account WHERE name = ‘100000’;
In database AtomiaBilling table account_details, locate fk_reseller_configuration_id – for SQL => select * from account_details where account_id = ‘b77b8b91-741b-4cf1-88b4-feb21550055c’ – for postgreSQL => select * from account_details where account_id = ‘b77b8b91-741b-4cf1-88b4-feb21550055c’ - Locate the fk_reseller_configuration_id in the AtomiaBilling database.
SQL Server => SELECT fk_reseller_configuration_id FROM account_details WHERE account_id = ‘b77b8b91-741b-4cf1-88b4-feb21550055c’;
PostgreSQL => SELECT fk_reseller_configuration_id FROM account_details WHERE account_id = ‘b77b8b91-741b-4cf1-88b4-feb21550055c’;
In database AtomiaAccount, language table, locate the id for the desired language that you want to add to Root reseller – for SQL => select * from language – for postgreSQL => select * from language - Locate the ID for the desired language in the AtomiaAccount database.
SQL Server => SELECT * FROM language;
PostgreSQL => SELECT * FROM language;
Run the following query to add desired language to Root Reseller as available language into database AtomiaBilling and table reseller_languages for SQL: Begin tran insert into reseller_languages (id, iso_639_name, fk_reseller_configuration_id) values (NEWID(), ‘ES’, ‘b91d1194-af86-4d1b-850d-51b5ac9a3aca’), rollback commit for postgreSQL begin. Insert into reseller_languages (id, iso_639_name, fk_reseller_configuration_id) values (uuid_generate_v4(), ‘ES’, ‘b91d1194-af86-4d1b-850d-51b5ac9a3aca’), rollback commit. - Run the following query in the AtomiaBilling database to add desired language to the root reseller as available language.
SQL Server => BEGIN TRAN; INSERT INTO reseller_languages (id, iso_639_name, fk_reseller_configuration_id) VALUES (NEWID(), 'ES', 'b91d1194-af86-4d1b-850d-51b5ac9a3aca'); COMMIT TRAN; PostgreSQL => BEGIN; INSERT INTO reseller_languages (id, iso_639_name, fk_reseller_configuration_id) VALUES (uuid_generate_v4(), 'ES', 'b91d1194-af86-4d1b-850d-51b5ac9a3aca'); COMMIT;
- On the server where Store is installed you need to open IIS manager and Recycle pool for Store and Order.
- Open Windows PowerShell as Administrator on the server where Store is installed and run the following command: iisreset.
- Open your Order Website and refresh it. The new languages are now available in the language selector.
<data name="EN_GB_name" xml:space="preserve"> <value>English British</value> <comment>Language resource convention</comment> </data> <data name="EN_GB_shortname" xml:space="preserve"> <value>GB</value> <comment>Language resource convention</comment> </data>
Setting up languages in Identity
- For the new languages added to the database to be available in the Login page, you need to make resource files resx for the Login page. Resource files need to be stored in:
C:\Program Files(x86)\Atomia\Identity\STS\App_GlobalResources. - The procedure of making resx files is same as before, make a copy of default one and name it to regard language that you are adding. In this case it would be: BreadCrumbItems.en-GB.resx.
- After making resx files, enable this new language in Web.config file by adding this language to the list. Adding new language in list has to be done through a transformation file that has to be located in:
C:\Program Files(x86)\Atomia\Identity\STS\Transformation Files.
<appConfig xmlns=“Atomia.Web.Base.Configs” xmlns:xdt=“http://schemas.microsoft.com/XML-Document-Transform"> <languagesList> <language name="sv-SE” displayName=“Swedish (Sweden)“ iSOTwoLetterCode=“sv” default=“false” xdt:Transform=“Remove” xdt:Locator=“Match(name)” /> <language name=“en-US” displayName=“English (United States)“ iSOTwoLetterCode=“en” default=“false” xdt:Transform=“SetAttributes(default) ” xdt:Locator=“Match(name)” /> <language name=“es-ES” displayName=“Spanish (Spain)“ iSOTwoLetterCode=“es” default=“true” xdt:Transform=“Insert” xdt:Locator=“Match(name)” /> </languagesList> </appConfig> </configuration>
- After adding the transformation file, run Recreate config file located at: C:\Program Files (x86)\Atomia\Identity.
- Open the Login page and refresh it. The new languages are now available.