Languages

From TITAN Wiki
Revision as of 13:38, 31 January 2018 by Admin (talk | contribs)
Jump to: navigation, search

Titan is a multi-language script and supports all languages. Some of them are preinstalled (English, Spanish, Polish, Indonesian, Turkish, Russian, German). If you are missing some translations or your language is not preinstalled, you need to add it.

How to add new language to Titan

Step 1: Create new language file

  • Decide which language you want to add and copy the ASP.NET Culture code from http://msdn.microsoft.co...825488%28v=cs.20%29.aspx . For example, if you want to add Portuguese language, your culture code is: pt-PT
  • Go to App_GlobalResurces and copy L1.resx to L1.CULTURECODE.resx; for Portuguese it would be L1.pt-PT.resx
  • Open the L1.CULTURECODE.resx file with resx (XML viewer), the best would be Visual Studio Express (it's free and very useful with Titan customization) and create the translations:
  • Save the file

Step 2: Translate the updates

Complete Step 1 for all language files for all updates, e.g. U2600.resx, U3000.resx, U3500.resx, U4000.resx etc. We are adding new language file with each update to keep the whole system stable. So we don't modify/edit/enlarge the files you already translated. We are adding a new file with new content. 

Step 3: Add the language flag

Open ~/Controls/LanguagePanel.ascx.cs file and add your culture code to the set of languages (line 19). So in our example we will change: string[] languages = { "en-US", "pl-PL", "es-ES", "de-DE", "ru-RU", "id-ID" }; to string[] languages = { "en-US", "pl-PL", "es-ES", "de-DE", "ru-RU", "id-ID", "pt-PT"};

How to add new translatable texts to Titan?

See https://usetitan.com/forum/yaf_postst40_HOWTO--Add-your-own-translatable-texts-images.aspx

What do we want to achieve? - You added your own text on the page and want to make it appear in different languages like any other Titan translated texts - You added the image and want it to change, depending on member language option

How to do it? Let's assume you have your website in 2 languages: English (default) and Polish. Get your language codes from: http://msdn.microsoft.co...825488%28v=cs.20%29.aspx  In our case we have: pl-PL for Polish; 

1. Create new directory App_GlobalResources on your Titan root directory (If it's already there, e.g. you have Ultimate license pack or created it before - SKIP THIS STEP) so you have ~/App_GlobalResources folder now

2. Create 2 .resx files: L2.resx and L2.pl-PL.resx in ~/App_GlobalResources folder; Even if you somehow changed the default language from English, L2.resx (without the code) will always be English file.

3. Open the page you want to add translates to, and place the following code: <%=Resources.L2.RESCODE1 %> where RESCODE1 is unique resource code:

Languages.png

4. Now open the .RESX files by Visual Studio 2012 (Express) or any other reader and add your texts:

Languages2.png

Finished!

How to change default language?

See: https://usetitan.com/forum/yaf_postst68_HOWTO--Change-default-language.aspx

Languages

Resource Files (number of records)

English Spanish Polish Indonesian Turkish Russian German
L1 (512)
U2502 (6)
U2600 (18)
U3000 (14)
U3500 (25)
U3501 (28)
U3900 (15)
U4000 (101)
U4001 (2)
U4100 (2)
U4200 (187)
U5001 (27)
U5002 (3)