Create a language pack for Spanish

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
karelv
Posts: 5
Joined: Wed Dec 23, 2020 1:11 pm

Create a language pack for Spanish

Post by karelv » Wed Dec 23, 2020 1:28 pm

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?

laborix
Posts: 40
Joined: Sat Feb 16, 2019 3:51 pm

Re: Create a language pack for Spanish

Post by laborix » Fri Dec 25, 2020 11:13 am

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 :)

karelv
Posts: 5
Joined: Wed Dec 23, 2020 1:11 pm

Re: Create a language pack for Spanish

Post by karelv » Sat Dec 26, 2020 8:20 am

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.

laborix
Posts: 40
Joined: Sat Feb 16, 2019 3:51 pm

Re: Create a language pack for Spanish

Post by laborix » Sat Dec 26, 2020 8:39 am

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.

karelv
Posts: 5
Joined: Wed Dec 23, 2020 1:11 pm

Re: Create a language pack for Spanish

Post by karelv » Sat Dec 26, 2020 10:50 am

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.

User avatar
Arvid
FlatPress Coder
Posts: 189
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: Create a language pack for Spanish

Post by Arvid » Sat Dec 26, 2020 1:58 pm

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

karelv
Posts: 5
Joined: Wed Dec 23, 2020 1:11 pm

Re: Create a language pack for Spanish

Post by karelv » Sat Dec 26, 2020 2:41 pm

Sure. When I finish the remainder of the translation, and
carry out a final and complete check,I will upload this laguage pack.
Regards.

User avatar
Arvid
FlatPress Coder
Posts: 189
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: Create a language pack for Spanish

Post by Arvid » Sun Dec 27, 2020 11:45 am

Awesome, thank you very much :)

karelv
Posts: 5
Joined: Wed Dec 23, 2020 1:11 pm

Re: Create a language pack for Spanish

Post by karelv » Wed Dec 30, 2020 7:52 pm

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.

User avatar
Arvid
FlatPress Coder
Posts: 189
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: Create a language pack for Spanish

Post by Arvid » Sat Jan 02, 2021 12:39 pm

Great work, thank you very much! The structure was perfect, I just integrated your language pack into the FlatPress repository.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest