Page 1 of 1

Create a language pack for Spanish

Posted: Wed Dec 23, 2020 1:28 pm
by karelv
HI.
I want to make a language pack for Spanish.
I read the instruction how to do that:

-create fp-interface/lang/es-es
-copy content of en-us to es-es
and translate every file
for my first test, only (lang.conf.php, lang.comments.php, lang.contact.php, lang.default.php) done.

-create fp-plugins/(plugin)/lang/lang.es-es.php for each plugin. Already done (translated from en-us).

In the directory fp-interface/lang/es-es
I edited the file lang.conf.php to:

Code: Select all

<?php
	
	$langconf = array();
	$langconf['id'] = 'Español (es)';
	$langconf['locale'] = 'es-es';
	$langconf['charsets'][0] = 'utf-8';
	$langconf['charsets'][1] = 'iso-8859-15';

?>
This makes a “Español (ES)” option appearing under the ADMIN “Options” Language dropdown menu
I selected this option and saved. Until there, all OK.

I get the config file on fp-content/config/settings.conf.php

Code: Select all

  array (
    'timeoffset' => '1',
    'timeformat' => '%H:%M:%S',
    'dateformat' => '%A, %B %e, %Y',
    'dateformatshort' => '%Y-%m-%d',
    'charset' => 'utf-8',
    'lang' => 'es-es',
But, when I go to my site home, I get the error

Code: Select all

Flatpress this page isn't working localhost is currently unable to handle this request. http error 500.
If I change 'lang' => 'es-es', to 'lang' => 'en-us', in fp-content/config/settings.conf.php
Everything is back to normal.

Change from EN To DE and back with no problem.

What am I doing wrong?

Re: Create a language pack for Spanish

Posted: Fri Dec 25, 2020 11:13 am
by laborix
There is a bit more than only fp-interface/lang/es-es :)

You have to add to every plugin/plugin-folder you use a lang-folder with the lang-content and, ifyou want to make a Setup in Spanish possible, you need to add/change all files inside the setup-folder. It's a bit tricky since the most langpacks are included as default in Flatpress :)

Re: Create a language pack for Spanish

Posted: Sat Dec 26, 2020 8:20 am
by karelv
There is a bit more than only fp-interface/lang/es-es :)
In my post I said:
I read the instruction how to do that:

-create fp-interface/lang/es-es
-copy content of en-us to es-es and translate every file
for my first test, only (lang.conf.php, lang.comments.php, lang.contact.php, lang.default.php) done. The rest still in english

-create fp-plugins/(plugin)/lang/lang.es-es.php for each plugin. Already done (translated from en-us). Every /(plugin)/lang/lang.es-es.php Already created and translated from English
In the directory fp-interface/lang/es-es
I edited the file lang.conf.php .........
If you want to make a Setup in Spanish possible, you need to add/change all files inside the setup-folder. It's a bit tricky since the most langpacks are included as default in Flatpress :)
I just want to change the language of my blog to spanish.

Re: Create a language pack for Spanish

Posted: Sat Dec 26, 2020 8:39 am
by laborix
Sorry, I didn't read all lines in you posting.

Please, test the content of your language files, that you use UFT-8 format. And if the 500 still appears, please take the special characters out of the translation and use standard ASCII code. Only for testing.

Re: Create a language pack for Spanish

Posted: Sat Dec 26, 2020 10:50 am
by karelv
Thanks for reply, but.
Error already Found.

So many files to translate, and it was only a missing character in one variable in mediamanager plugin. ;)

Code: Select all

'selectaction' 	=> '-- seleccione la acción --,
In place of

Code: Select all

'selectaction' 	=> '-- seleccione la acción --',
Now with the remainder of the translation.

Re: Create a language pack for Spanish

Posted: Sat Dec 26, 2020 1:58 pm
by Arvid
Sometimes, it's the little things ;)

karelv, welcome the the FlatPress support forum!
Glad you found your bug. If your translation is done, feel free to send me your laguage pack. It could then be part of the next FlatPress version, so the whole Spanish-speaking community could enjoy your work.

All the best
Arvid

Re: Create a language pack for Spanish

Posted: Sat Dec 26, 2020 2:41 pm
by karelv
Sure. When I finish the remainder of the translation, and
carry out a final and complete check,I will upload this laguage pack.
Regards.

Re: Create a language pack for Spanish

Posted: Sun Dec 27, 2020 11:45 am
by Arvid
Awesome, thank you very much :)

Re: Create a language pack for Spanish

Posted: Wed Dec 30, 2020 7:52 pm
by karelv
Already made a complete check, and uploaded to the Wiki-Languages.
Please test it, and make remarks, if something is not correct.
I create a Flatpress folder with two folders inside fp-interface - fp-plugins with the current Flatpress folder and sub-folder structure
with only the translated files es-es.
Regards.

Re: Create a language pack for Spanish

Posted: Sat Jan 02, 2021 12:39 pm
by Arvid
Great work, thank you very much! The structure was perfect, I just integrated your language pack into the FlatPress repository.