How to set up languages in Store, Order page and Identity for new theme
In this HOWTO solution, we will explain to you how you can set up desired languages to be available and how to set up the desired language to be a default for your applications.
How to set up languages in Store and Order page
Before beginning it is necessary to say those available languages in Order page are defined by root reseller. Languages that are selected for root reseller are going to be available in Order page.
To set up available languages in order page you need to take following steps:
Login into Admin panel, go to Settings => Reseller Configuration and setup Root Reseller. This HOWTO will help you out to do that
If desired languages are listed in field “Available languages” you have to select them and click “SAVE”. In case that languages are not listed in field “Available languages” you have to follow next steps:
- First, it is necessary to insert the desired language in database AtomiaAccount , table languages using next query (this language is only an example)
In MSSQL dialect:
Insert into AtomiaAccount.dbo.language (id, name, iso639name, culture)
values(NEWID(), ‘British’ , ’EN’, ‘GB’)
In PostgreSQL dialect, against AtomiaAccount database:
Insert into language (id, name, iso639name, culture)
values(uuid_generate_v4(), ‘British’ , ’EN’, ‘GB’)
- It is necessary to add resource files *.resx into folder in this location
C:\Program Files (x86)\Atomia\Store\App_GlobalResources . It is important that you name files like in this case Common.en-GB.resx and CustomerValidation.en-GB.resx. The easiest way to make resx files is to make a copy of default ones and name it as it is said already. After that, using some text editor you have to make a translation for text between
<value> Some text for translation </value> to the desired language.
After making resx files for desired language it is important to edit Common.resx files and add following blocks:
<data name="EN_GB_name" xml:space="preserve">
<comment>Language resource convention</comment>
<data name="EN_GB_shortname" xml:space="preserve">
<comment>Language resource convention</comment>
Now you need to select desired languages in Reseller configuration. In Admin panel, go to Settings => Reseller configuration , scroll down to list "Available languages" . Here you have to select languages that you want to have in Store language selector visible, and click "SAVE".
- If you are not able to see Root reseller in Reseller Configuration you need to add language to root reseller thru database running following querys:
1. First you need to 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' 2. From database AtomiaBilling and table account_details you need to find 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' 3. From databbase AtomiaAccount , table language you need to locate id for desired language that you want to add to Root reseller - for SQL => select * from language - for postgreSQL => select * from language 4. After you acquire all this information, you need to run 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
On the server where Store is installed you need to open IIS manager and Recycle pool for Store and Order.
How to set up languages in Identity
In order to set up available language in Login page , you have to take following steps.
Since at the beginning of this HOWTO solution you have added new language to database, now it is necessary also to make resource files resx for 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, an example would look like BreadCrumbItems.en-GB.resx
After making resx files, it is necessary to enable this new language in Web.config file by adding this language to the list. Adding new language in list has to be done thru transformation file that has to be located in
C:\Program Files(x86)\Atomia\Identity\STS\Transformation Files . Example of transformation file for adding, updating and removing languages is listed below
IMPORTANT In order to make changes to configuration files in Atomia Applications, you have to follow rules and regulations regarding Atomia configuration files and transformation. More information about it can be found on following links:
After adding transformation file it is necessery to run Recreate config file located at his location: C:\Program Files (x86)\Atomia\Identity
Open Login page and refresh and new language should be available.