Setting up languages

311 views 0

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

  1. Go to Admin panel > Settings > Reseller Configuration
  2. Select languages in field Available languages, and klick Save.
  3. If the desired languages are not listed in field Available languages, proceed as follows:
  4. Insert the desired language in database AtomiaAccount, table languages using the following query (this language is only an example).
    1. In MSSQL dialect:
    Begin tran
    Insert into AtomiaAccount.dbo.language (id, name, iso639name, culture)
    values(NEWID(), ‘British’ , ’EN’, ‘GB’)
    commit 
    
    1. In PostgreSQL dialect, against AtomiaAccount database:
    Begin; 
    Insert into language (id, name, iso639name, culture)
    values(uuid_generate_v4(), ‘British’ , ’EN’, ‘GB’)
    commit 
    
  5. Add resource files *.resx into folder in location: C:\Program Files (x86)\Atomia\Store\App_GlobalResources.

Keep in mind

Name the files as for the above example 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.

  1. Use a text editor to make a translation for text between <value> Some text for translation </value> to the desired language.
  2. After making resx files for the desired languages, add the following blocks to the Common.resx files:
  3. <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>
    
  4. Go to the list of Available languages in Admin panel > Settings > Reseller Configuration.
  5. Select the languages that you want to display in the language selector in Store, and click Save.
  6. 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:
    1. 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. 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’
    3. 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
    4. 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.
    5. 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;
      
  7. On the server where Store is installed you need to open IIS manager and Recycle pool for Store and Order.
  8. 2016-05-18.png

    Image 1: Recycling pools after installation.

  9. Open Windows PowerShell as Administrator on the server where Store is installed and run the following command: iisreset.
  10. Open your Order Website and refresh it. The new languages are now available in the language selector.

Setting up languages in Identity

  1. 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.
  2. 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.
  3. 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.
  4. <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>
    

Important!

To be able to make changes to configuration files in Atomia Applications, you have to follow the rules and regulations regarding as given in the Atomia configuration files and transformation. For more information, see the following link: http://support.atomia.com/solution/articles/4000010876-atomia-configuration-files-and

  1. After adding the transformation file, run Recreate config file located at: C:\Program Files (x86)\Atomia\Identity.
  2. Open the Login page and refresh it. The new languages are now available.

Was this helpful?