Difference between revisions of "Languages"

From TITAN Wiki
Jump to: navigation, search
m (How to change default language?)
m
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
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.
+
Titan is a multi-language script and supports all languages. Some of them are preinstalled (English, Spanish, Polish, Indonesian, Turkish, Russian, German, French, Portugese). If you are missing some translations or your language is not preinstalled, you need to add it.
  
 
== How to add new language to Titan ==
 
== How to add new language to Titan ==
 
'''''Step 1: Create new language file'''''
 
'''''Step 1: Create new language file'''''
* Decide which language you want to add and copy the ASP.NET Culture code from <nowiki>http://msdn.microsoft.co...825488%28v=cs.20%29.aspx</nowiki> . For example, if you want to add Portuguese language, your culture code is: pt-PT
+
* Decide which language you want to add and copy the ASP.NET Culture code from https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).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
 
* 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:
 
* 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:
Line 10: Line 10:
  
 
Complete Step 1 for all language files for all updates, e.g. U2600.resx, U3000.resx, U3500.resx, U4000.resx etc.
 
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. 
+
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. Translation is extremely easy (it looks like translating an Excel table):
 +
[[File:LanguagesTable.png|none|thumb]]
  
'''''Step 3: Add the language flag'''''
+
'''''Step 3: Add the language to Titan'''''
  
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:                                             
+
Open new ticket witch such topic in Titan support system.
'''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? ==
 
== 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?'''''
 
'''''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 your own text on the page and want to make it appear in different languages like any other Titan translated texts
Line 27: Line 23:
  
 
'''''How to do it?'''''
 
'''''How to do it?'''''
Let's assume you have your website in 2 languages: English (default) and Polish. Get your language codes from: <nowiki>http://msdn.microsoft.co...825488%28v=cs.20%29.aspx</nowiki> 
+
Let's assume you have your website in 2 languages: English (default) and Polish. Get your language codes from: https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx 
 
In our case we have: pl-PL for Polish; 
 
In our case we have: pl-PL for Polish; 
  
Line 37: Line 33:
 
[[File:Languages.png|thumb|none]]
 
[[File:Languages.png|thumb|none]]
  
'''4.''' Now open the .RESX files by Visual Studio 2012 (Express) or any other reader and add your texts:
+
'''4.''' Now open the .RESX files via Visual Studio Express or any other reader and add your texts:
 
[[File:Languages2.png|none|thumb]]
 
[[File:Languages2.png|none|thumb]]
  
Line 43: Line 39:
  
 
== How to change default language? ==
 
== How to change default language? ==
See: https://usetitan.com/forum/yaf_postst68_HOWTO--Change-default-language.aspx
+
Go to Admin Panel -> Website -> Settings -> Languages
  
 
{| class="wikitable"
 
{| class="wikitable"
 
!Languages
 
!Languages
 
Resource Files (number of records)
 
Resource Files (number of records)
!style="width:78px;"|English  
+
!style="width:78px;"|English
 
!style="width:78px;"|Spanish
 
!style="width:78px;"|Spanish
 
!style="width:78px;"|Polish
 
!style="width:78px;"|Polish
Line 56: Line 52:
 
!style="width:78px;"|German
 
!style="width:78px;"|German
 
!style="width:78px;"|French
 
!style="width:78px;"|French
!style="width:78px;"|!Portuguese (Brazil)
+
!style="width:78px;"|Portuguese
 
|-
 
|-
!L1 (512)
+
!L1 (506)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
Line 66: Line 62:
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
|
+
|style="background-color:#ffff00;"|
|
+
|style="background-color:#ffff00;"|
 
|-
 
|-
 
!U2502 (6)
 
!U2502 (6)
Line 77: Line 73:
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
|
+
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
 
|-
 
|-
 
!U2600 (18)
 
!U2600 (18)
Line 88: Line 84:
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
|
+
|style="background-color:#ffff00;"|
|
+
|style="background-color:#7de16b;"|  
 
|-
 
|-
 
!U3000 (14)
 
!U3000 (14)
Line 99: Line 95:
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
 
|-
 
|-
 
!U3500 (25)
 
!U3500 (25)
Line 110: Line 106:
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#ffff00;"|
 
|style="background-color:#ffff00;"|
|
+
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
 
|-
 
|-
 
!U3501 (28)
 
!U3501 (28)
Line 121: Line 117:
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
 
|-
 
|-
 
!U3900 (15)
 
!U3900 (15)
Line 132: Line 128:
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
 
|-
 
|-
 
!U4000 (101)
 
!U4000 (101)
Line 143: Line 139:
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
 
|-
 
|-
 
!U4001 (2)
 
!U4001 (2)
Line 154: Line 150:
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
 
|-
 
|-
 
!U4100 (2)
 
!U4100 (2)
Line 165: Line 161:
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
 
|-
 
|-
!U4200 (187)
+
!U4200 (186)
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
 
|style="background-color:#7de16b;"|
Line 176: Line 172:
 
|
 
|
 
|style="background-color:#ffff00;"|
 
|style="background-color:#ffff00;"|
|
+
|style="background-color:#ffff00;"|
|
+
|style="background-color:#7de16b;"|  
 
|-
 
|-
 
!U5001 (27)
 
!U5001 (27)
Line 187: Line 183:
 
|
 
|
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
 
|-
 
|-
 
!U5002 (3)
 
!U5002 (3)
Line 198: Line 194:
 
|
 
|
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
|
+
|style="background-color:#7de16b;"|  
 
|-
 
|-
!U5003
+
!U5003 (29)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#ffff00;"|
 
|style="background-color:#ffff00;"|
Line 209: Line 205:
 
!
 
!
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
!
+
|style="background-color:#ffff00;"|
!
+
|style="background-color:#7de16b;"|
 
|-
 
|-
!U5004
+
!U5004 (30)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 220: Line 216:
 
!
 
!
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
!
+
|style="background-color:#7de16b;"|
!
+
|style="background-color:#7de16b;"|
 
|-
 
|-
!U5005
+
!U5005 (5)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 231: Line 227:
 
!
 
!
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
!
+
|style="background-color:#7de16b;"|
!
+
|style="background-color:#7de16b;"|
 
|-
 
|-
!U5006
+
!U5006 (78)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 242: Line 238:
 
!
 
!
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
!
+
|style="background-color:#ffff00;"|
!
+
|style="background-color:#7de16b;"|
 
|-
 
|-
!U5007
+
!U5007 (54)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 253: Line 249:
 
!
 
!
 
!
 
!
!
+
|style="background-color:#ffff00;"|
!
+
|style="background-color:#7de16b;"|
 
|-
 
|-
!U5008
+
!U5008 (31)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 264: Line 260:
 
!
 
!
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
!
+
|style="background-color:#7de16b;"|
!
+
|style="background-color:#7de16b;"|
 
|-
 
|-
!U5009
+
!U5009 (18)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 275: Line 271:
 
!
 
!
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
!
+
|style="background-color:#ffff00;"|
!
+
|style="background-color:#7de16b;"|
 
|-
 
|-
!U6000
+
!U6000 (126)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 289: Line 285:
 
!
 
!
 
|-
 
|-
!U6002
+
!U6002 (49)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 300: Line 296:
 
!
 
!
 
|-
 
|-
!U6003
+
!U6003 (43)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 311: Line 307:
 
!
 
!
 
|-
 
|-
!U6004
+
!U6004 (21)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 322: Line 318:
 
!
 
!
 
|-
 
|-
!U6005
+
!U6005 (34)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 333: Line 329:
 
!
 
!
 
|-
 
|-
!U6006
+
!U6006 (38)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 344: Line 340:
 
!
 
!
 
|-
 
|-
!U6007
+
!U6007 (14)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 355: Line 351:
 
!
 
!
 
|-
 
|-
!U6008
+
!U6008 (44)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 366: Line 362:
 
!
 
!
 
|-
 
|-
!U6009
+
!U6009 (6)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 377: Line 373:
 
!
 
!
 
|-
 
|-
!U6010
+
!U6010 (132)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 388: Line 384:
 
!
 
!
 
|-
 
|-
!U6011
+
!U6011 (44)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!
Line 399: Line 395:
 
!
 
!
 
|-
 
|-
!U6012
+
!U6012 (92)
 
|style="background-color:#7de16b;"|  
 
|style="background-color:#7de16b;"|  
 
!
 
!

Latest revision as of 13:14, 4 April 2018

Titan is a multi-language script and supports all languages. Some of them are preinstalled (English, Spanish, Polish, Indonesian, Turkish, Russian, German, French, Portugese). 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 https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).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. Translation is extremely easy (it looks like translating an Excel table):

LanguagesTable.png

Step 3: Add the language to Titan

Open new ticket witch such topic in Titan support system.

How to add new translatable texts to Titan?

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: https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).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 via Visual Studio Express or any other reader and add your texts:

Languages2.png

Finished!

How to change default language?

Go to Admin Panel -> Website -> Settings -> Languages

Languages

Resource Files (number of records)

English Spanish Polish Indonesian Turkish Russian German French Portuguese
L1 (506)
U2502 (6)
U2600 (18)
U3000 (14)
U3500 (25)
U3501 (28)
U3900 (15)
U4000 (101)
U4001 (2)
U4100 (2)
U4200 (186)
U5001 (27)
U5002 (3)
U5003 (29)
U5004 (30)
U5005 (5)
U5006 (78)
U5007 (54)
U5008 (31)
U5009 (18)
U6000 (126)
U6002 (49)
U6003 (43)
U6004 (21)
U6005 (34)
U6006 (38)
U6007 (14)
U6008 (44)
U6009 (6)
U6010 (132)
U6011 (44)
U6012 (92)