Differences in Revisions: Creating language file

fixed code blocks
# Creating language file
 
If you want to create a language file in your native language you have to follow these steps:
 
* First download the [latest english language file](http://git.ipfire.org/?p=ipfire-2.x.git;a=tree;f=langs/en/cgi-bin;hb=HEAD) out of the [git](http://git.ipfire.org/).
 
* Now you can start your translation. It is possible to type in characters like ä, ü, â, é (umlaut, accent, etc.) but be aware of the character ' - this has to be escaped. For Example:*This is 'IPFire' Version 2.7* has to typed in as:*This is /'IPFire/' Version 2.7*.
* Now you can start your translation. It is possible to type in characters like ä, ü, â, é (umlaut, accent, etc.) but be aware of the character ' - this has to be escaped.
* e.g., `This is 'IPFire' Version 2.7` is entered as: `This is /'IPFire/' Version 2.7`.
 
If your are done you may test it in your own IPFire system:
 
* Copy your language file to*/var/ipfire/langs/XX.pl* (e.g. french:*/var/ipfire/langs/fr.pl*)
* Copy your language file to */var/ipfire/langs/XX.pl* (e.g. french:*/var/ipfire/langs/fr.pl*)
* Then open file*/var/ipfire/langs/list* with your favorite editor and enter your language.
* Then open file */var/ipfire/langs/list* with your favorite editor and enter your language.
 
 
<file bash e.g for french: file: /var/ipfire/langs/list>
file = `/var/ipfire/langs/list`
```
`en:English:Englisch`
en:English:Englisch
`de:German:Deutsch`
de:German:Deutsch
`fr:French:Französisch`
fr:French:Französisch
`fa:persian:Farsi`
fa:persian:Farsi
```
</file>
 
* Now you have to update the language cache. Connect via ssh to your IPFire and type the following command:
 
```
`perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"`
perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
```
 
* Or as an alternative:
 
```
`update-lang-cache`
update-lang-cache
```
 
* You have to do this after any changes you made of your language file to see your inserts on the webinterface. This is pretty annoying - a fast way during testing is to delete the cache files (e.g. cache-lang.pl.en), then IPFire will read everytime directly out of the pl file.
 
* To change the webinterface to your new language just go to GUI and select your language from the pull-down-menu.
* To change the web interface to your new language just go to GUI and select your language from the pull-down-menu.
 
### Error 500
 
## Error 500
If you have changed the language and you get an **Internal Server Error** when you try to reach the webinterface, then there is something wrong in your language file.
With the command:
 
If you have changed the language and you get an **Internal Server Error** when you try to reach the webinterface, then there is something wrong in your language file. With the command:
 
```
`tail /var/log/httpd/error_log`
tail /var/log/httpd/error_log
```
 
your are able to read out what is wrong.
 
To get the webinterface back to work, you may edit the file:*/var/ipfire/main/settings*.
To get the web interface back to work, you may edit the file: */var/ipfire/main/settings*.
There you will find a line starting with*LANGUAGE=*. Just get back to english language by entering:
There you will find a line starting with *LANGUAGE=*. Just get back to english language by entering:
 
```
`LANGUAGE=en`
LANGUAGE=en
```
 
and all will work fine again.