Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Categories names in _spanish_

(Page 1 of 2)
> >
Quote Reply
Categories names in _spanish_
Hi !

Is there a way to change Links filesystem directories creation behaviour when it finds a category name with a tilde ? (for example : 'Computación')

Links change the letter 'ó' for '_', so when the directory is created in the filesystem it ends up with the name 'Computaci_n'.

I would like Links to create the directory with the same letter, but without the tilde : Computacion

The same goes for á, é, í, ó, ú, ü, ñ ...

Could somebody point me to the location on Links code where I should perform the modification ?

Thanks !

Rob.

Last edited by:

netcomve: Dec 23, 2002, 5:04 PM
Quote Reply
Re: [netcomve] Categories names in _spanish_ In reply to
This has been discussed before. I think you will find that it is the OS (whatever system you are running under) problem, and not directly linked to Links SQL. Could be wrong, but thats what I remember being said by Alex/Paul etc Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Categories names in _spanish_ In reply to
But where in the code are the directories created ?

Maybe I can change something to check the names before creating the directories.

Thanks,

Rob.
Quote Reply
Re: [netcomve] Categories names in _spanish_ In reply to
Hello,

I am so interested in this issue too. Any aditional information about it?

Thanks!
Quote Reply
Re: [netcomve] Categories names in _spanish_ In reply to
There is already solution for this in Links SQL.
You do not need to automatically convert the names like this: 'Computaci_n' . You can just fill the correct names what you want, like this: Computacion/subComputacion.

There is a 'build_directory_field' option in Admin config.
You have to fill this option with a name (eg: DirName), and create a new field in the Category table.

The new DirName will have to contain the category name (path), where the actual category will be built.
It have to be file system compatible.
E.g. computers/accessories

Did you use Links 2.0 with Non-english mod before?
If you want to upgrade the imported Full_Name category names to Non-english category names, then I have just created a plugin for myself to do that task.
The plugin will be useful for those users, who just upgrade their old Links v2.0 and the Non-English mod database to Links SQL 2.1.1. Purpose of this plugin is, to convert non-english category names found in Non-English column to Links SQL category names. (if you just imported your Links 2.0 database to Links SQL 2.x).
The 'DirName', 'Full_Name', 'Name' columns will be filled out (overwritten) based on the 'Nonenglish' column data.

If anybody has this situation, this plugin will be available upon request to them for FREE.
Just PM me for the plugin.

EDIT: of course my solution is only usable if you use only 1 foreign language. If you want category names in 2, 3 or more languages, this is not your solution.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Dec 27, 2002, 1:06 PM
Quote Reply
Re: [webmaster33] Categories names in _spanish_ In reply to
Thanks for your help webmaster33 !

Anyways, if someone could point me to the part of the code where the filesystem directories are created, please let me know. I have 608 categories created, and it seems a lot of work to fill a new column in the Categories table with the new names. Maybe I could automate the creation of the directories with the acceptable filesystem characters by changing/adding code that would replace the original spanish characters.

Regards,

netcomve
Quote Reply
Re: [netcomve] Categories names in _spanish_ In reply to
That's what my plugin does. Not exactly does what you need, but can be modified to fit your needs.
The plugin could be modified to convert your non-directory compatible category names to directory compatible format, and place them into DirName column.

Let me know your database structure.
Please give me 4-5 typical rows example from your following columns from your database:
Name, Full_Name, (and if you have Nonenglish column that one, too)

I could examine it, and see what can I do with the plugin.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Categories names in _spanish_ In reply to
Here are the examples (from the Category table) :

Name Full_Name

Educación Educación
Profesional Educación/Profesional
Publicaciones Educación/Publicaciones
Organizaciones Educación/Organizaciones
Hogar Hogar
Jardinería Hogar/Jardinería
Bonsai Hogar/Jardinería/Bonsai

Thanks for your help !

Regards,

netcomve
Quote Reply
Re: [netcomve] Categories names in _spanish_ In reply to
Could you please also list all special accented Spanish characters?
And in a new line below, matching normal chars, without accents.

E.g:
áéó...
aeo...

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Categories names in _spanish_ In reply to
Here they are :

á,é,í,ó,ú,ñ,ü

a,e,i,o,u,n,u

Regards,

netcomve
Quote Reply
Re: [netcomve] Category names in _spanish_ In reply to
Thanks, very much. It is a good start.
Oh, BTW. Please list á,é,í,ó,ú,ñ,ü as CAPITALS, too, ok?

If you could find additional other accented letters used in French, or other languages, I would be grateful (except Hungarian accented chars. I know them :-)

I will need a few days to do the changes, and create a new plugin for that task. Please be patient.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Category names in _spanish_ In reply to
Hi!

I also have this special characters (Spanish, Galego and Catala) and few "french" (¿?) like 'Lancôme':

á é í ó ú à è ì ò ù ä ë ï ö ü ç

Á É Í Ó Ú Ñ À È Ì Ò Ù

â ê î ô û

Please, let me know when you finish your mod. Iam so interested in it too.

Thanks!

Last edited by:

avant: Dec 28, 2002, 7:21 AM
Quote Reply
Re: [avant] Category names in _spanish_ In reply to
So I will do translation this way:
á à â ä é ê è ë í ì î ï ó ò ö ô ő ú ù ü û ű ç ñ
a a a a e e e e i i i i o o o o o u u u u u c n
Is the translation correct?
Please check it. Not sure in ñ=n and ç=c .

The list contains accented chars from Spanish, Galego, Catalan, Hungarian.
If somebody knows other chars not in this list, let me know.

I know, finally I will have to look for a HTML entity list, but I'm just lazy at that time Wink.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Dec 28, 2002, 9:28 AM
Quote Reply
Re: [webmaster33] Category names in _spanish_ In reply to
Hi webmaster33 !

Yes, the list you posted is correct : Those are the characters and their correspondant replacements.

Regards,

netcomve
Quote Reply
Re: [netcomve] Category names in _spanish_ In reply to
Ok. Thanks.
Hopefully the first beta will be ready for release today.
Would you want to test the first beta?
(requires a test database or database backup. I can not guarantee failsafe work in beta stage!)

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Category names in _spanish_ In reply to
Sure ! My e-mail : r@net.com.ve

Thanks !

netcomve
Quote Reply
Re: [Andy] Categories names in _spanish_ In reply to
What are the valid directory name chars for Unix? Are there any differences of valid directory chars in Unixes?
What are valid directory name chars for Windows?

Or the inverse: which are invalid?


EDIT: at the moment I accept the following chars as valid directory chars:
Code:
a-z A-Z 0-9 - _ .
Yes, I accept the point, too.
Additionally in path the / is accepted.


Opinions?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Jan 2, 2003, 7:12 AM
Quote Reply
Re: [webmaster33] Categories names in _spanish_ In reply to
These are invalid UNIX characters (for directory naming use) :

`'|*()/<>\?";&#~

I guess the same applies for Windoze.

netcomve

Last edited by:

netcomve: Jan 2, 2003, 3:44 PM
Quote Reply
Re: [netcomve] Categories names in _spanish_ In reply to
At the moment I did set the
a-z A-Z 0-9 - _ .
charset. This will be the default.

I discussed it on the #linux channel, and we accepted that these are the most safe chars which would fit all file systems. In the plugin, the default charset is optionally changeable, so you can extend it with any characters you want to accept as valid char.

Practically the plugin is finished, working, just adding some user changeable options.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Jan 3, 2003, 12:18 AM
Quote Reply
Re: [netcomve] International category & valid directory names In reply to
Would you even think, that this almost unreadable text can be converted to readable string?:
Code:
!`Çompútérs#_!a`b\\c|d@e?f_+/@#|Ácçélérátíón_*&

After converting accents will look like:
Code:
!`Computers#_!a`b\\c|d@e?f_+/@#|Acceleration_*&

After replacing invalid chars with _ will look like:
Code:
__Computers___a_b__c_d_e_f__/___Acceleration___

After trimming leading & trailing _ chars, and merging multiple _ chars will look like:
Code:
Computers_a_b_c_d_e_f/Acceleration
It's much readable, isn't? Cool

If anybody also have some test strings, let me know, post them here, and I will test them.


The DirName_converter plugin has the following working features:
- converts accents (accented chars, and replaced chars are all changeable on admin interface)
- replaces invalid chars with a user defined char (default is _ ). Valid charset is editable on admin interface.
- merges multiple delimiter chars (optional, admin interface)
- trims leading delimiter char (optional, admin interface)
- trims trailing delimiter char (optional, admin interface)
- Debug mode option, so you can display all changes how are done (optional, admin interface)

Still doing some tests & code clearing, but basically it works fine.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Jan 4, 2003, 8:13 PM
Quote Reply
Re: [webmaster33] International category & valid directory names In reply to
Hi webmaster33,

Will this plug-in be available thru the Links SQL Plug-in Manager ?

Thanks !

netcomve
Quote Reply
Re: [netcomve] International category & valid directory names In reply to
Yes, maybe within a week or so.
This the first plugin release, so I do not know how the procedure works. I contacted the support already.

But before it will be available in LSQL Downloads, I would like you to test some people.
You could be one who tries it out.
Will send it to your email, when I finished testing & code clearing.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Jan 5, 2003, 11:38 AM
Quote Reply
Re: [webmaster33] International category & valid directory names In reply to
Ok. Thanks !

netcomve
Quote Reply
Re: [netcomve] International category & valid directory names In reply to
Just sent to you in email, the DirName converter v1.0.2beta plugin.
Try it out, and let me know, what problems did you have (if had), and what's your opinion.

Thanks,
Webmaster33

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] International category & valid directory names In reply to
Thanks webmaster33. I received it. I will test it and report to you any problem I might found.

Regards,

netcomve
> >