Difference between revisions of "Languages"

From TITAN Wiki
Jump to: navigation, search
m (How to change default language?)
(Tag: visualeditor-switched)
m
Line 202: Line 202:
 
|-
 
|-
 
!U5003
 
!U5003
|
+
|style="background-color:#7de16b;"|  
 
!
 
!
 
!
 
!
Line 213: Line 213:
 
|-
 
|-
 
!U5004
 
!U5004
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 224: Line 224:
 
|-
 
|-
 
!U5005
 
!U5005
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 235: Line 235:
 
|-
 
|-
 
!U5006
 
!U5006
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 246: Line 246:
 
|-
 
|-
 
!U5007
 
!U5007
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 257: Line 257:
 
|-
 
|-
 
!U5008
 
!U5008
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 268: Line 268:
 
|-
 
|-
 
!U5009
 
!U5009
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 279: Line 279:
 
|-
 
|-
 
!U6000
 
!U6000
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 290: Line 290:
 
|-
 
|-
 
!U6002
 
!U6002
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 301: Line 301:
 
|-
 
|-
 
!U6003
 
!U6003
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 312: Line 312:
 
|-
 
|-
 
!U6004
 
!U6004
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 323: Line 323:
 
|-
 
|-
 
!U6005
 
!U6005
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 334: Line 334:
 
|-
 
|-
 
!U6006
 
!U6006
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 345: Line 345:
 
|-
 
|-
 
!U6007
 
!U6007
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 356: Line 356:
 
|-
 
|-
 
!U6008
 
!U6008
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 367: Line 367:
 
|-
 
|-
 
!U6009
 
!U6009
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 378: Line 378:
 
|-
 
|-
 
!U6010
 
!U6010
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 389: Line 389:
 
|-
 
|-
 
!U6011
 
!U6011
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!
Line 400: Line 400:
 
|-
 
|-
 
!U6012
 
!U6012
!
+
|style="background-color:#7de16b;"|
 
!
 
!
 
!
 
!

Revision as of 17:01, 19 February 2018

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 French Portuguese (Brazil)
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)
U5003
U5004
U5005
U5006
U5007
U5008
U5009
U6000
U6002
U6003
U6004
U6005
U6006
U6007
U6008
U6009
U6010
U6011
U6012